I have a script(main.sh) which calls another script(Get_Files.sh) and gets a value in a variable like the below:
File_to_Refresh="$(sh /Aug/work/Get_Files.sh /Aug/Work/Universal_File.txt)"
Now I have to schedule the script main.sh for 3 different files i.e. the Universal_File.txt with 3 different values and on 3 different days.
So, to make the script generic, I want to pass the Universal file to Get_Files.sh from the Cron Entry only.
How Can i achieve the same?
Below is working if I run the script manually like sh /Aug/Work/main.sh /Aug/Work/Universal_File.txt but it's not working when i run it through cron.
File_to_Refresh="$(sh /Aug/work/Get_Files.sh "$1")"
45 08 * * * sh /Aug/Work/main.sh /Aug/Work/Universal_File.txt