I am writing a script that checks files in the directory has shell pid as an extension and rename them in such a way that extension is removed. I have renamed couple of files to add ext using mv filename filename.$$.
I need advice on how to rename them again so that they do not contain the PID.
So far I have witten:
for file in *
do
if [ -s $file ]
then
if [ $file = *.[0-9] ]
then
#mv command
fi
fi
done
** this is harassing me for past couple of hours **
:(