The UNIX and Linux Forums  


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




Thread: sed
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-28-2008
coolkid coolkid is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 69
sed

Guys
do you know any other command that will insert a line at particular line number...I used this one...but it is not working if the above lines are blank.

This command will put "name=cat.abc.com at 11th line.But if there is no line 10 the command is not working...

sed '10a\ name = cat.abc.com' con.txt


Really appreciate if you guys can help me out with this...alll i need is a command to put lines (append or insert) at particular line number...

Thanks alot
CK