~johanvandegriff/unix-shell-programming-revised-edition-programs

unix-shell-programming-revised-edition-programs/first_last -rw-r--r-- 282 bytes
fc214385Johan Vandegriff added other old scripts, some newer ones too 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
case "$1" in
  -f ) echo "$2";;
  -l ) shift `expr $# - 1`
       echo "$1";;
 -fl ) echo "$2"
       shift `expr $# - 1`
       echo "$1";;
 -lf ) lastarg="$2"
       shift `expr $# - 1`
       echo "$1"
       echo "$lastarg";;
   * ) echo "usage: $0 [-lf] args";;
esac