check if string exists in file -crontab issue
Posted by Roshan on Mar 04, 2018; 4:02pm
URL: http://erman-arslan-s-oracle-forum.124.s1.nabble.com/check-if-string-exists-in-file-crontab-issue-tp5299.html
Hi,
I have a shell script(imp.sh) which I would like to execute based on a condition
If IMPORTGAIAGCICIFLAG is set to TRUE from application.properties file, the imp.sh should execute
45 17 * * * [ $(\grep "IMPORTGAIAGCICIFLAG=TRUE" /comptel/DNR/DNRTOOL/FILES/application.properties 2>/dev/null) ] && sh /home/oracle/imp.sh
On crontab it is not working, but when I execute the script in shell, it works.
Please advise.
ROshan