replace carriage returns - the final solution
Kenneth Brody
kenbrody at bestweb.net
Wed Jul 7 09:09:45 PDT 2004
"Jay R. Ashworth" wrote:
>
> On Wed, Jul 07, 2004 at 10:20:51AM -0500, Richard D. Williams wrote:
> > Thanks to all and a special thanks to Ted Dodd.
> > Here is what I ended up doing.
[...]
> That's easier to read, certainly... but it's probably more efficient to
> do it as a pipeline:
>
> cat $1 |
> tr -d '\000' |
> sed 's/~//g' |
> tr -d '\r' |
> tr -d '\n' |
> cat >/appl/servefx/shared/working/$1
[...]
Can't you combine all the "tr -d"s?
tr -d '\000\r\n' | sed 's/~//g' >/appl/servefx/shared/working/$1
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
More information about the Filepro-list
mailing list