Question: Using a cron to run these two scripts I have run these scripts manually and they have worked beautifully one script to grep a command
Using a cron to run these two scripts
I have run these scripts manually and they have worked beautifully one script to grep a command from text and number the lines :
,
yet for cron gives an error saying saying for this script:
Try 'grep --help' for more information.
specified string not present in
0
--------------------------------------------------------------------------
for the 2nd script which works fine manually :

yet for cron says :


Here is what my crontab looks like:

/bin/bash grep $1 $2 rc=$? if[$rc !- ] then echo "specified string $1 not present in $2" else echo "specified string $1 is present in the file $2" fi # number of nes of in a file WC -1 $2| awk 'print $1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
