The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



Thread: sed help
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-01-2008
Tytalus's Avatar
Tytalus Tytalus is offline
Registered User
 

Join Date: Jun 2003
Location: Scotland
Posts: 248
This :

Code:
#  sed '1,/020108/{//i\
Add this line before
} ' infile
produces this output with your input above:

Code:
013008 .......
013008 .......
013108 .......
013108 .......
013008 .......
Add this line before
020108
020108 ........
Is this what you're after ?
Reply With Quote