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 :

,Using a cron to run these two scripts I have run these

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 :

scripts manually and they have worked beautifully one script to grep a

yet for cron says :

command from text and number the lines : , yet for cron

gives an error saying saying for this script: Try 'grep --help' for

Here is what my crontab looks like:

more information. specified string not present in 0 -------------------------------------------------------------------------- for the 2nd

/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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!