|
checking parameter values passed to script
Hi,
I will pass 3 parameters for a script.I have to check the file name and create a new file name with time stamp.
the parameters which i'm passing are
/dir/stg/filename.txt
/dir/path/head.txt
/dir/path/tail.txt
Now i have to check filename like :
if it is a.txt i have to create a_`date '+%Y%m%d_%H%M%S'`.txt
if it is b.txt the new file should be b_`date '+%Y%m%d_%H%M%S'`.txt
How can we do this with in a script.
Thanks in advance!
|