Hi ,
I am an Oracle developer. trying to write a shell script to compile all the forms that are modified in last 1 hour.
Script Body
cat cmp.sh
for f in `find ./*fmb* -mmin -60`; do "`frmcmp_batch.sh userid=ba/ba@testdb batch=yes module=$f module_type=form compile_all=yes window_state=minimize`"; done
for f in `find ./*err* -mmin -60`; do "`tail -1 $f`"; done
This is what I am trying to do in script above.
- Search all the forms (*.fmb) in current directory that are modified in last 1 hour.
- Compile forms from step 1 using forms compiler utility script frmcmp_batch.sh.
- Print the last line of corresponding .err file created after compilation of each form.
Though the script runs as expected and compiles forms but it also gives error messages like
./cmp.sh
./cmp.sh: line 1: : command not found
./cmp.sh: line 2: Created form file ./test.fmx: No such file or directory
Note: Text Created form file ./test.fmx is output of tail command.
Please let me know the reason for command not found and No such file or directory errors.
Thanks,
Imran.