White space through a pipe in a Bourne shell

From: Patrick Farley <farley_at_Manassas1.TDS-GN.LMCO.COM>
Date: Thu, 20 Mar 1997 10:31:29 -0500

Anyone know how to save the white spaced that is shoved through a pipe in a
Bourne Shell?

I have the command:

cat /tmp/file.txt |while read AA
 

/tmp/file.txt looks like this before going through the pipe and while read
command.
 
 0.0 6611 /opt2/dome/
 0.0 6831 /opt2/dome/
 0.0 13532 /opt2/dome/
 0.0 13773 /opt2/dome/

The output looks like this:

0.0 6611 /opt2/dome/
0.0 6831 /opt2/dome/
0.0 13532 /opt2/dome/
0.0 13773 /opt2/dome/
0.0 15482 /opt2/dome/

I've losted the formatting that was in the original file.
I need to be able to cut -c the first and second column and
with this odd formatting it gets darn near impossible.

Of course, I could be a moron and there may be a better way to do this.

-Patrick
Received on Thu Mar 20 1997 - 17:11:39 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT