Advertisement
fernandop

minibash.sh

Sep 4th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "bemvindo ao minibash
  4. comandos disponiveis: listar sair"
  5.  
  6. while :; do
  7.    read -p '$ ' cmd
  8.    case $cmd in
  9.       listar)
  10.          ls ;;
  11.       sair)
  12.          exit ;;
  13.       '')
  14.          continue ;;
  15.       *)  
  16.          echo $cmd: comando invalido ;;
  17.    esac
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement