EnderUNIX Team.


EnderUNIX tips

Mail to My Friend , Home Page

[ Shell Scripting ]

"STRING REMOVAL" - Ülkü SAYILAN - (2003-12-10 06:29:12)   [4050]

STRING REMOVAL

What the following does:

rm `ls -al | grep str | awk '{if ($9 !~ /^str/) {print $9}'`

Removes all files that contains the string "str" excepts
those that begin with it. Changing the !~ to =~ does the
opposite.


Mail to My Friend , Home Page