Hi,
First of all: STOP SCREAMING, we can read it perfectly with a normal font size!!
The command you are using (for THIS in *xml; do echo ${THIS} | awk -F. '{ print "mv "$0" "$1"."$2"."$3"."$6 }' | bash ; done) looks for xml files and does not know which files need to be changed and which do not (*xml -> all xml files).
Changing *xml to a more precise regular expression will help:
for THIS in hid*.2[0-9]*.[0-9]*.[0-9]*.xml; do echo ${THIS} | awk -F. '{ print "mv "$0" "$1"."$2"."$3"."$6 }' | bash ; done
This looks for files that:
- start with hid, followed by anything (the hid* part),
- followed by a dot and a 2 followed by any number (the .2[0-9]* part),
- followed by a dot and any number (the .[0-9]* part. Twice!),
- followed by a dot and xml.
As you probably noticed, this has nothing to do with crontab.
Hope this helps.
|