[wplug] Line-by-line input from stdin, from a bash script ?
Pat Barron
pat at lectroid.com
Mon Oct 14 12:49:14 EDT 2013
Does anyone have any favorite methods of doing "line at a time" input
from stdin, using a bash script? Is "read" reliable enough to use for
this? Will it do antisocial things to me, like trimming trailing
whitespace from lines it reads? (Ultimately, what I want is the exact
input, byte-for-byte, that was read from stdin...). I've only ever used
it, really, for prompting for stuff interactively, never tried to use it
from a script. Is there some other way I'm not aware of?
--Pat.
More information about the wplug
mailing list