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
Computer Science & Information Technology
You might also like to view...
Errors flagged by the Spelling and Grammar checker can be customized in the ________ section of the Word Options dialog box
A) General B) Display C) Advanced D) Proofing
Computer Science & Information Technology
You can use the ____ property to control the timing of transitions in fading screens or scrolling text.
A. brightness B. direction C. duration D. opacity
Computer Science & Information Technology