Hello everyone,
Ok so I'm a literal newbie to Unix scripting (kornshell in my case) so try not to flail me too much =D
I have a bunch of files that have this sort of format:
test1.log
test2.log
test3.log
I'm trying to create a script that will take those files and rename them with the current datestamp in the middle like so:
test1_102705.log
test2_102705.log
test3_102705.log
I tried the following command:
mv test?.log test?_`date '+%m%d%y'`.log
But my AIX box obviously didn't like that =P I'm sure this is probably a pretty simple thing but I haven't seen any similar examples around using a wildcard. Any help is appreciated!
Thanks,
Jisoo23
Ok so I'm a literal newbie to Unix scripting (kornshell in my case) so try not to flail me too much =D
I have a bunch of files that have this sort of format:
test1.log
test2.log
test3.log
I'm trying to create a script that will take those files and rename them with the current datestamp in the middle like so:
test1_102705.log
test2_102705.log
test3_102705.log
I tried the following command:
mv test?.log test?_`date '+%m%d%y'`.log
But my AIX box obviously didn't like that =P I'm sure this is probably a pretty simple thing but I haven't seen any similar examples around using a wildcard. Any help is appreciated!
Thanks,
Jisoo23