Hello,
I would like some help with a very basic script that I think should work but when from cron it doesn't. When ran manually it works fine. The script goes something like this
cd /wfmtransfer/import/agents/changed
for i in `ls -1 *.xml`
do
[something] --this will create a .OUT file
check=`grep Failure $i.OUT|wc -l`
if [ $check -ge 1 ]
then
mv $i.OUT /wfmtransfer/imports/agents/Failure
cp $i /wfmtransfer/imports/agent/Failure/originals
cp $i /wfmtransfer/imports/agents/original_file
else
mv $i.OUT /wfmtransfer/imports/agent/Success
cp $i /wfmtransfer/imports/agents/original_file
fi
done
When the script runs from cron I get a copy in the original_file folder but nowhere else and I can't figure this out at all. Running the script manually works fine.
Any help would be greatly appreciated.
Thanks,
G
---------- Post updated at 05:52 AM ---------- Previous update was at 05:39 AM ----------
Its ok I figured it out