I need to rename all the files in the current directory,if it contains specific letters using shell programming.
For that I used
if (`grep $2 $file`) then
mv "$file" newname;
in $2 the specific characters are stored.
How should I modify this code?
Are there any simple way to do that?
I am using cygwin in windows xp