bashscr:parameter
Bash - Parameters
- The first parameter passed to the script is $1, the second $2 and so on
- If you want to to check more then one possibilities of parameter passed to the script then a case is useful
case "$1" in start) # start command 1 command 2 command 3 ;; stop) # stop command 1 command 2 command 3 ;; *) # anything other echo "Use: {start|stop}" >&2 exit 1 ;; esac
bashscr/parameter.txt · Last modified: 02.04.2013 13:48 by eanderalx