[will@localhost ShellScript]$ cat function.sh
#!/bin/shfunction printit(){ echo "Your choice is $1"}case $1 in "one") printit 1 ;; "two") printit 2 ;; "three") printit 3 ;; *) echo "Usage {one|two|three}" ;;
function printit(){
echo "Your choice is $1"}
case $1 in "one") printit 1 ;; "two") printit 2 ;; "three") printit 3 ;; *) echo "Usage {one|two|three}" ;;
esac
[will@localhost ShellScript]$
張貼留言
沒有留言:
張貼留言