Bill Jonas on Wed, 6 Jun 2001 12:00:07 -0400 |
On Wed, Jun 06, 2001 at 11:39:18AM -0400, Jeff Abrahamson wrote: > This is a nit-pick, but rather important if you actually ever program > something, even at the level of writing a pipe. You *can* pipe binary > input through a pipe without worrying what's in that input (assuming > the program at the other end is ok with it). Right -- I wasn't quite accurate there. EOF is actually determined by the listed file size. OTOH, the shell (as you correctly pointed out) interprets ^D as EOF and logs you out (unless ingnoreeof is set, then it says "Use logout to leave the shell" for the same number of times for the number to which ignoreeof is set, but that's more semantic nitpicking). And many other filter-type programs (grep, rot13, bc, etc) will exit when you hit ^D when in interactive mode. Which I guess begs the question: Do the programs themselves interpret ^D as the end-of-file while in interactive mode, or does the shell do this and send them an EOF character? -- Bill Jonas * bill@billjonas.com * http://www.billjonas.com/ "As we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously." -- Benjamin Franklin ______________________________________________________________________ Philadelphia Linux Users Group - http://www.phillylinux.org Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|