- 论坛徽章:
- 0
|
我写了7个脚本如下,每天备份出一个文件 :
请问如何将这7个脚本合并成1个 ?主要是01,02,...07这几个数字用变实现。 先谢谢了 !
bak1.sh :
rm /u01/dpdir/scott01.dmp
expdp scott/tiger directory=dpdir dumpfile=scott01 schemas=scott logfile=scott01.log
bak2.sh
rm /u01/dpdir/scott02.dmp
expdp scott/tiger directory=dpdir dumpfile=scott02 schemas=scott logfile=scott02.log
...
bak7.sh :
rm /u01/dpdir/scott07.dmp
expdp scott/tiger directory=dpdir dumpfile=scott07 schemas=scott logfile=scott07.log
crontab -l (内容有7行,需要合并成1 行):
30 5 * * 0 /u03/dpdir/dp0.sh
30 5 * * 1 /u03/dpdir/dp1.sh
......
30 5 * * 6 /u03/dpdir/dp6.sh |
|