Rewrite bundle (page 451) so the script it creates takes an optional list of filenames as arguments. If one or more filenames are given on the command line, only those files should be re-created; otherwise, all files in the shell archive should be re-created. For example, suppose all files with the file- name extension .c are bundled into an archive named srcshell, and you want to unbundle just the files test1.c and test2.c. The following command will unbundle just these two files:
$ bash srcshell test1.c test2.c
$ cat bundle2
#!/bin/bash
# bundle: group files into distribution package
echo "# To unbundle, bash this file"
for i
do
echo 'if echo $* | grep -q' $i '|| [ $# = 0 ]'
echo then
echo "echo $i 1>&2"
echo "cat >$i <<'End of $i'"
cat $i
echo "End of $i"
echo fi
done
You might also like to view...
Design View provides maximum flexibility for designing a form, but requires more time on your part.
Answer the following statement true (T) or false (F)
All components are controlled by ________, which depends on drivers
A) ROM B) the processor C) RAM D) the motherboard
A(n) ____________________ font, such as Times New Roman, has visible strokes at the ends of the character.
Fill in the blank(s) with the appropriate word(s).
The summary calculation that calculates the smallest value in the field is ____.
A. COUNT B. AVG C. MAX D. MIN