Shebang
Paul Jarc
prj@po.cwru.edu
Mon Mar 8 22:46:00 GMT 2004
cgd@broadcom.com wrote:
> anyway if you look at the example I pasted, your trick obviously
> doesn't work on linux with /bin/sh...
No, it works. Your test script isn't quite right: shcat is reading
from stdin, ignoring its arguments. If you use this version, I think
you'll find that it works everywhere:
#!/bin/sh
while read x; do
echo "$x"
done < "$1"
Or simply:
#!/bin/sh
exec cat ${1+"$@"}
paul
More information about the Gcc
mailing list