Re: What should we do with the -n flag in sh ?

2016-02-25 Thread David Laight
On Mon, Feb 22, 2016 at 09:14:17PM +0700, Robert Elz wrote: > ... If you have both the I and n options set, > there is no way (from inside the shell) to make it quit - if you send > it EOF, it tells you nicely to use "exit" to exit, but when you try > that, it ignored you (as it should.) At leas

Re: What should we do with the -n flag in sh ?

2016-02-25 Thread Dustin Marquess
Indeed. mksh seems to trigger on the 13rd EOF (not sure WHY 13): -o ignoreeof The shell will not (easily) exit when end-of-file is read; exit must be used. To avoid infinite loops, the shell will exit if EOF is read 13 times in a row.

Re: What should we do with the -n flag in sh ?

2016-02-25 Thread Robert Elz
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 simpl