要编译某个目录下所有fmb的文件,最快的办法就是使用批处理,脚本如下
#!/bin/bash
cd /
ls /home/oracle/fmb/*.fmb | xargs -i frmcmp_batch.sh module={} userid=scott/tiger@orcl batch=yes compile_all=yes
linux区分大小写,若还有FMB的文件要编译,还得多加一句
#!/bin/bash
cd /
ls /home/oracle/fmb/*.fmb | xargs -i frmcmp_batch.sh module={} userid=scott/tiger@orcl batch=yes compile_all=yes
ls /home/oracle/fmb/*.FMB | xargs -i frmcmp_batch.sh module={} userid=scott/tiger@orcl batch=yes compile_all=yes
还有一种比较简单的方法,就是用find代替ls,如下:
#!/bin/bash
find /home/oracle/fmb -name "*.[F|f][M|m][B|b]" -print | sort | xargs -i frmcmp_batch.sh module={} userid=scott/tiger@orcl batch=yes compile_all=yes
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7865774/viewspace-612067/
,如需转载,请注明出处,否则将追究法律责任。