The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-17-2008
FunibonE FunibonE is offline
Registered User
  
 

Join Date: Jul 2008
Location: Silicon Forest
Posts: 16
Quote:
Originally Posted by Annihilannic View Post
Not sure I fully understand the requirements, but try this variation:

Code:
sed -e '/^[0-1][0-9][0-9]FILE/s/^[0-1][0-9][0-9]/& /'  file
If that isn't what you want, give us some more sample input data (including the lines you don't want to change) and the output you expect from that data.

Hi. I was trying to keep the question simple but I guess I can't anymore so here is the actual data.

Code:
TRUE 6.8785794488e-05 0.000 0.000 FALSE 6.8785794488e-05 0.000 0.000TRUE 1 FALSE 1 TRUE
TRUE 1.8093516870e-02 0.999 0.030 TRUE 1.8093255236e-02 0.999 0.057TRUE 1 FALSE 1 TRUE
The above is just 2 line of a very large file. The problem is, I need a space between the 0.000 and TRUE so I can import it correctly into excel.

The numbers are not constant and is a changing variable. I need to be able to target just the lines containing [0-1].[0-9][0-9][0-9]TRUE and put a space/tab to separate the number and the TRUE.

Thanks.