/var/tmp/exercise-two/Alice/likes/an-ox <---- a file /var/tmp/exercise-two/Emily/has-bought/a-horse <---- a file /var/tmp/exercise-two/Gary/has-bought/a-rhino <---- a directory /var/tmp/exercise-two/Gary/has-bought/a-rhino/less <---- a file /var/tmp/exercise-two/Gary/has-bought/a-rhino/is <---- a file /var/tmp/exercise-two/Gary/has-bought/a-rhino/more <---- a file /var/tmp/exercise-two/Mary/is/a-snake <---- a file則在你的 exer2 下建立如下對應的結構.
~/unix-1091/exer2/ |---Alice/ | `---likes/ | `---an-ox |---Emily/ | `---has-bought/ | `---a-horse |---Gary/ | `---has-bought/ | `---a-rhino/ | |---is | |---less | `---more `---Mary/ `---is/ `---a-snake注意: 若是檔案的話, 內容必須一樣, 也就是說要用複製的.
$ cat IN klim 120 oak -233 cat -999 goo 12 $ ./ex6.sh < IN max is klim, value = 120 min is cat, value = -999 $
$ ./hanoi 3 # move 3 discs, from A to C by B from A to C from A to B from C to B from A to C from B to A from B to C from A to C $ ./hanoi 2 # move 2 discs, from A to C by B from A to B from A to C from B to C $
$ ls -l total 16 -rw-r--r-- 1 klim sys 34 Nov 5 16:11 IN -rwxr-xr-x 1 klim sys 322 Nov 5 16:10 ex6.sh* -rwxr--r-- 1 klim sys 387 Nov 25 18:38 ex8-tmp.sh* -rwxr--r-- 1 klim sys 377 Nov 25 18:35 ex8.sh* $ $ ./ex8.sh None $ $ ./ex8.sh IN ex6.sh newest: IN biggest: ex6.sh $ $ ./ex8.sh . newest: ex8-tmp.sh biggest: ex8-tmp.sh $ $ ./ex8.sh . /var/tmp/killed-idle-process newest: ex8-tmp.sh biggest: /var/tmp/killed-idle-process $
$ $ 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 klim 10 20 milk 199 joejoe 20 # klim is appeared again! OAk 100 red 200 10 klim 30 # KLIM 2000 joeJOEjoe 199 marry 20 julie 2000 #joe joe $ $ ./ex10.awk IN-10 MARRY = 20.00 RED = 105.00 JULIE = 2000.00 OAK = 100.00 KLIM = 20.00 JOEJOE = 109.50 MILK = 199.00 $