>>>>> "Ramesh" == Ramesh Polepalli < ramesh.polepalli%40mformation.com">ramesh.polepalli
mformation.com> writes:
Ramesh> cat Sourcefile | grep -v "ignorestring" > newfile
That's a "useless use of cat" - grep for that for details.
Ramesh> mv newfile Sourcefile
Ramesh> Is there any command line "One liner" available to do the same in Perl
Ramesh> without having to create new file and renaming it back?
Yes, it's called "in-place editing", and is described on "perldoc perlrun"
under the "-i" switch. If you have any questions after reading that
document, please ask again.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
< merlyn%40stonehenge.com">merlyn
stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
.