in reply to remove a line from a set of file in a directory

perl -ni -e 'print unless /sample/' *.*

This WILL modify all files in the directory. Use with caution.

Replies are listed 'Best First'.
Re^2: remove a line from a set of file in a directory
by davidrw (Prior) on Jul 22, 2005 at 16:16 UTC
    To OP: do perldoc perlrun for the explaination of the -i switch including how to have it make backup copies for you.
    Also, you may want * instead of *.* for _all_ (including extension-less ones) (though note that on linux that won't get hidden files)