Better yet...
perl -ni.bak -e "print unless /^\s*subnet/" input.txt
will update input.txt and backup the original file in input.txt.bak.
Tim
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo
>Hi, I would like to parse a file and delete the entire line if it begins
with
>subnet.
>How can I do this in Perl?
>Thanks.
Step one: Type the command
perl -e "print unless /^\s*subnet/" -n infile.txt >outfile.txt
where infile.txt and outfile.txt have the obvious meaning.
Step two:
Hi, I would like to parse a file and delete the entire line if it begins with
subnet.
How can I do this in Perl?
Thanks.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users