This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |