Guest User

Untitled

a guest
Nov 27th, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ### MAIN ###
  4. USAGE="ERROR: RaidcomScript.sh requires two arguments: -s <serial> and -f <inputfile>"
  5.  
  6. set -- `getopt s:f: $* 2>/dev/null/`
  7. if [ $? -ne 0 ]; then
  8. echo $USAGE
  9. EXITCODE=1
  10. exit $EXITCODE
  11. fi
  12.  
  13. while [ $# -gt 0 ]; do
  14. case $1 in
  15. -s)
  16. SERIAL=$2
  17. shift 2
  18.  
  19. ;;
  20. -f)
  21. INPUTFILE=$2
  22. shift 2
  23.  
  24. ;;
  25. --)
  26. shift
  27. break
  28. ;;
  29. esac
  30. done
Advertisement
Add Comment
Please, Sign In to add comment