>Is there an easy way to disregard lines that contain only control 
>characters or filter the text?

Not trivially.  As you've been shown, "tr -d" is your
buddy.  In the particular case of unwanted CR's in the
input from a tty driver, the driver itself can strip those.
Maybe something like:

exec <input
stty igncr
while read ...
...
done >>output

The exec switches the stdin of the script to whatever
so that the stty and the read loop both eat from the
same device, which is not closed (thus losing the
settings) between the two.

-- Jim




_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to