linux - Using Shell, How can I read one text file's value and enter it into running crontab as input? -
i want run 1 cronjob in need supply input. input have 1 text file. how can read text file data , supply input cronjob?
i running 1 cron job .sh file. needs input data 2-3 times while running. data stands text1.txt, text2.txt, etc.
now, want read data these text files , insert input in running cronjob. crontab file execution waits "expect" command. , expects data go ahead, , data residing in text file.
so if understand correctly, run script cronjob; somewhere in script can say:
x=`cat file`
or can add cat file | grep something
1 line file
and later use $x expected input.
Comments
Post a Comment