Introducing UNIX and Linux |
Introduction to shellsOverview |
Answer to chapter 7 question 3The script must initially check that all the arguments are
readable, then it can simply pass them all to for i in "$@" # For each argument do if [ ! -r "$i" ] # if it is not (!) readable (-r) then exit 1 # then bomb out fi done cat "$@" # cat the files |
Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck