Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ### MAIN ###
- USAGE="ERROR: RaidcomScript.sh requires two arguments: -s <serial> and -f <inputfile>"
- set -- `getopt s:f: $* 2>/dev/null/`
- if [ $? -ne 0 ]; then
- echo $USAGE
- EXITCODE=1
- exit $EXITCODE
- fi
- while [ $# -gt 0 ]; do
- case $1 in
- -s)
- SERIAL=$2
- shift 2
- ;;
- -f)
- INPUTFILE=$2
- shift 2
- ;;
- --)
- shift
- break
- ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment