> I'd like to know if "sh file" is exactly the same as "cat file |
> sh". If there is any difference, what is it? I'd like to know that
> in order to write a utility program to unshar a bunch of files,
> passing the lines to sh via a pipe.
The two are NOT the same, but for your purposes the difference should
not matter. The difference is that "sh file" reads commands from the file
directly leaving standard input available for the script to read user
input from while "cat file|sh" (or better "sh < file") takes its commands
from standard input and so can't get any commands from the user using
Brian Blackmore, Darwin College, The University of Kent at Canterbury, UK.
Beyond the shadow of a dream who knows what lies