|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
|
Thread Tools | Display Modes |
|
||||
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 anymore hints ? |
|
||||
the -n flag, not -d
Right. I tested with the print function {...;p;} and did not re-re-checked with the delete {...;d You win Note that, RTFM should have told why. Anyway, I learned the use of braces.
__________________
da more I know I know I know nuttin' |
Tags |
sed |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PHP read file contents - Maximum file size | cksraj | Programming | 1 | 21st September 2009 11:38 AM |
K3b cannot find growisofs | maxrussell | FreeBSD General | 5 | 26th April 2009 12:20 PM |
Command to find and replace, but not creating a new file | 18Googol2 | Programming | 4 | 22nd September 2008 10:28 PM |
pkg_add g95;g95 x.f95: cannot find g95 | enpey | OpenBSD Packages and Ports | 8 | 27th August 2008 12:48 AM |
where might I find 'libcamel'? | Damien787 | FreeBSD Ports and Packages | 16 | 17th June 2008 11:35 PM |