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 > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-30-2009
swat swat is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 24
Angry Insert character in the line

Hi All,

I have below type file.

abc|asd|pqr|2|2|2
asc|qwe|scf|5|4|4

Pipe location and count is dynamic and coming from a variable.
I want to change it to below files.
(chnage the first pipe to 3 pipes)
abc|||asd|pqr|2|2|2
asc|||qwe|scf|5|4|4
(chnage the second pipe to 4 pipes)
abc|asd||||pqr|2|2|2
asc|qwe||||scf|5|4|4

It should be dynamic.

Thanks,
SWAT