hi all,
I wrote a simple shell script called
main.sh and inside it calling another shell script called
rename.sh.Both are placed in a same directory.[/home/srimal/test]
$cat main.sh
Code:
#!/bin/sh
echo "Hello Buddy !!!!|Last Update : "`date --date="-1 days" +%Y-%m-%d`"|" >> Report.txt
sh rename.sh
exit
$cat rename.sh
Code:
#!/bin/sh
mv Report.txt "`date --date="-1 days" +%Y%m%d`""Report".txt
exit
What I want to do here is to Run
main.sh in every day at 13.10pm
So I did as follows but file rename thing did not execute and it created in my
home directory not in the
test directory.
$crontab -u srimal -l
Code:
10 13 * * * /home/srimal/test/main.sh
However my idea is to learn how to run multiple shell scripts using crontab rather than only one shell script.Can any one guide me to a solution please.
Thanks.