Advertisement
Guest User

Untitled

a guest
May 25th, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. while [[ $# > 0 ]]
  3.     do
  4.     key="$1"
  5.  
  6.     case $key in
  7.         --help)helpval="1";;
  8.  
  9.         -f)viewFish="1";;
  10.  
  11.         -s)viewShark="1";;
  12.  
  13.         )fileinput="$key";; #how the hell do i do it
  14.  
  15.         *)  ;;
  16.     esac
  17. shift # past argument or value
  18. done
  19.  
  20. echo "$fileinput"
  21.  
  22.  
  23. echo "$helpval"
  24. echo "$viewShark"
  25. echo "$viewFish"
  26.  
  27. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement