0017-print.sh (590B)
1 #!/bin/sh 2 3 set -e 4 5 cleanup() 6 { 7 st=$? 8 rm -f file.a $tmp1 $tmp2 9 exit $st 10 } 11 12 trap 'rm -f file.a $tmp1' EXIT 13 trap 'exit 1' HUP INT TERM 14 15 tmp1=tmp1.$$ 16 17 #and now with no members in command line 18 cp master.a file.a 19 20 $EXEC scc ar -p file.a > $tmp1 21 diff -u $tmp1 - <<EOF 22 This is the first file, 23 and it should go in the 24 first position in the archive. 25 But this other one is the second one, 26 and it shouldn't go in the first position 27 because it should go in the second position. 28 and at the end, this is the last file 29 that should go at the end of the file, 30 thus it should go in the third position. 31 EOF