[wplug] Line-by-line input from stdin, from a bash script ?

G.Pitman gpitman at gmail.com
Mon Oct 14 12:56:56 EDT 2013


Not sure I understand your goal entirely but would a fifo work?


On Mon, Oct 14, 2013 at 12:49 PM, Pat Barron <pat at lectroid.com> wrote:

> 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.
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>


More information about the wplug mailing list