/var/tmp/exercise-two/Bob/has-bought/a-cow /var/tmp/exercise-two/Bob/has-bought/a-deer /var/tmp/exercise-two/Bob/has-bought/a-dog /var/tmp/exercise-two/David/is/a-tiger /var/tmp/exercise-two/David/is/a-tiger/fun /var/tmp/exercise-two/David/is/a-tiger/is /var/tmp/exercise-two/David/is/a-tiger/it則在你的 exer2 下建立如下對應的結構.
~/unix-1112/exer2 |---Bob | `---has-bought | |---a-cow | |---a-deer | `---a-dog `---David `---is `---a-tiger |---fun |---is `---it
$ ./ex6.sh usage: low high $ ./ex6.sh 34 usage: low high $ ./ex6.sh 3 4 25 $ ./ex6.sh 3 4 5 usage: low high $ ./ex6.sh 3 5 50 $
$ cat F1 12 34 11 $ cat F2 -4 33 78 23 40 $ ./ex7.sh F1 # read from F1 max is 34 min is 11 avg is 19.00 $ ./ex7.sh F2 # read from F2 max is 78 min is -4 avg is 34.00 $ ./ex7.sh F1 F2 # read from F1 and F2 max is 78 min is -4 avg is 28.37 $ ./ex7.sh # read from stdin 10 20 -9 max is 20 min is -9 avg is 7.00 $
$ seq 1 100 | ./ex8.sh $ seq 1 100 | ./ex8.sh 1 9 1 9 $ seq 1 100 | ./ex8.sh 1 12 34-35 77-80 1 12 34 35 77 78 79 80 $
$ $ cat IN-9 # oak 100 23 11 44 -99 10 # klim 1000 20 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # baga -100 -20 $ $ $ ./ex9.awk IN-9 oak 89 klim 1233 baga -120 $ $
$ cat IN-10 # this is a comment joejoejoe 10 20 30 #this is also a comment OAK -999 10 # 10000 joeJOE 2000 oak 10 milk 1000 # 2000 $ ./ex10.awk IN-10 OAK = -326.33 MILK = 1000.00 JOEJOE = 515.00 $