tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: What should we do with the -n flag in sh ?
Thank you both for the suggestion on what to do to with -I
(as it happens, the NetBSD shell will exit if it gets 50 EOF's
with no command between (I'm not certain, and haven't tested
it, but I suspect empty lines and lines containing only comments
might not count as commands, but something as simple as : would).
That wasn't something I knew before, and it isn't documented, but
it is what the code does...
But dealing with -I wasn't really the question, I'd appreciate opinions
on handling -n though (not so much in interactive shells, David Holland's
suggestion seems fine for that, and entirely reasonable) - but for
non-interactive shells (scripts that set -n in weird places, rather than
ones invoked as "sh -n script" which are easy to deal with.)
kre
Home |
Main Index |
Thread Index |
Old Index