Scripting question
I have a shell script that basically is supposed to do the following
1. calls oracle and executes sql scripts that create .doc files in the current directory
2. deletes existing .doc files in a reports directory
3. copies the new .doc files into the reports directory
I run the script as the oracle user, and the files are created/owned by the oracle user. I echo a whoami in the script, and of course it returns 'oracle'.
I am having trouble deleting the existing files. The script gets the following error on the delete command,
rm: cannot lstat `/var/www/html/dailyReports/DTC/TST_*': No such file or directory
using rm -rf doesn't give an error, but it doesn't delete anything either.
I even tried a simple ls -l on the directory and got the following error
ls: /var/www/html/dailyReports/DTC/TST_*: No such file or directory
I can execute the commands at the command line (as the oracle user) with no problem, but they will not execute in the script.
Any ideas? I'm thinking it must be something simple that I am missing.
|