I have a collections of scripts I am calling with a wrapper script. I want to update the $date variable each time it is call in the wrapper.
Current code:
start=$(date "+%m-%d-%Y-%T")
echo "Begin Executing Update Jobs at $start"
update1.sh
datetime1=$(date "+%m-%d-%Y-%T")
echo "Executed update 1 - $datetime1"
update2.sh
datetime2=$(date "+%m-%d-%Y-%T")
echo "Executed update 2 - $datetime2"
update3.sh
datetime3=$(date "+%m-%d-%Y-%T")
echo "Executed update 3 - $datetime3"
finish=$(date "+%m-%d-%Y-%T")
echo "Finished Execution at $finish"
Is there a better way to do this than calling the date every time to update it?
help function.