The UNIX and Linux Forums  

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 05-22-2008
Franklin52 Franklin52 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,345
You can't redirect the output to the inputfile. Redirect the output to a temporary file and move it to the original file, something like this:


Code:
awk '/<\/body>/ || /<\/html>/{next}1' file.html > file1.html

mv file1.html file.html

Regards