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 -->
  #7 (permalink)  
Old 11-25-2008
zaxxon's Avatar
zaxxon zaxxon is online now Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,281
Both ways are working on my boxes... Though maybe try something like (even I think it is unnecessary):
Code:
sed -e :a -e 's/,null,/, ,/;ta' result.txt
Edit:
Just saw the long example line.
With the shown line the 2 sed commands do not work on my boxes - I guess because of the already substituted adjacent commas of following ,null,null. So the loop in sed will be ok.

Last edited by zaxxon; 11-25-2008 at 07:15 AM.. Reason: Added info