Wednesday, 11 September 2013

shell script to copy file

shell script to copy file

I have create a shell script to copy all file have the same root. I have
been googling and find a solution but it can not work:
#!/bin/bash
cd /home/From_folder/
for f in *.drl
do
cp $f /home/To_folder/${f%.drl}$(date +%m%d%y).drl
done
Is there any another solution ? thankyou very much

No comments:

Post a Comment