The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: how can I ?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-17-2008
c0mrade c0mrade is offline
Registered User
 

Join Date: May 2008
Posts: 18
how can I ?

Hi all,

I've got some problems with editing a big configuration file .. its about 2k lines long.. anyway what I need is to place certain text to certain line number.. lets say I need to place "Something" on line 980 .. "something" else on line number 1500 and so on without tempering the rest of the configuration file ... I found somewhere this
Code:
head -981 conf.temp > conf.conf; echo "Email myemail@email.com" >> conf.conf; sed '4,$!d' <conf.temp >> conf.conf
it seems to work on one occasion but when I want to make another change in the configuration whole thing comes messed up, things appear double and so on ... any help ?

Thank you in advance ...
Forum Sponsor