View Single Post
  #3   (View Single Post)  
Old 24th June 2008
c0mrade's Avatar
c0mrade c0mrade is offline
Port Guard
 
Join Date: May 2008
Posts: 41
Default

Thank you for your answer : But the file stays unchanged

sed -n '/ptrisn.com/{N;N;d;}' named.conf

I've google something out but still can't get it working
Code:
awk '{if ($0 ~/pattern/) {getline; getline; continue}
            else print }'  old.txt > new.txt
I get this error from awk "awk: (FILENAME=old.txt FNR=126) fatal: `continue' outside a loop is not allowed"
anymore hints ?
Reply With Quote