1#!/bin/sh23set -e45trap 'rm -f file* $tmp1' EXIT6trap 'exit $?' HUP INT TERM78tmp1=tmp1.$$910############################################################################11#extract without parameters1213cp master.a file.a14$EXEC scc ar -xv file.a1516cat file1 file2 file3 > $tmp117diff -u $tmp1 - <<EOF18This is the first file,19and it should go in the20first position in the archive.21But this other one is the second one,22and it shouldn't go in the first position23because it should go in the second position.24and at the end, this is the last file25that should go at the end of the file,26thus it should go in the third position.27EOF2829if test `ls file? | wc -l` -ne 330then31 echo some error extracting files32 exit 133fi