The UNIX and Linux Forums  

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



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 11-28-2007
SebaM6 SebaM6 is offline
Registered User
 

Join Date: Nov 2007
Posts: 32
You can simply do whatever you want with test in ed/sed/awk etc.
Notice that, you can edit content of file during reading it and forward output from it to other file and after that simple overwrite it e.g. in awk:
Code:
awk 'some_code' some_file > new_file; mv new_file some_file
Or use ed like it:
Code:
ed file <<-ENDIT
g/nrumber_of_line/a/some_new_text/
w
q
ENDIT
depends from your expectations.
Reply With Quote