Can I use the case
statement to handle arguments? So, using -restart I'd like execute "-umount" and "-mount"
#!/bin/bash
case "$1" in
-mount
mount /ip/share1 /local/share1
;;
-umount
umount /ip/share1
;;
-restart
# echo TODO
;;
*)
[...]
esac
|
It looks to me like that should work, other than the syntactical quibble of missing
|
|||||||||||||||||||||
|
You could use a function as ^above^. |
|||
|