You are here

The final cut

So then, I had to rename this temp file that was in the format "filename.extension.TMP" to its original filename.

This was a solution for "cut":

newname=`echo $name| cut -f1,2 -d "."`
mv $name $newname

The parameter -f specifies that I want to use the first and second fields of the variable $name.

The parameter -d specified the delimiter to be "."; a period

And voila!


Just for your information, this script was intended for use as a batch renaming of files.