Files
mastering-unix-ss/chapter7/function_ready_to_run
Fabio Scotto di Santolo 4cc88d2f6e initial commit
2020-07-28 19:28:25 +02:00

19 lines
380 B
Plaintext
Executable File

ready_to_run ()
{
# set -x
# This function looks for a file on the system
# defined by the $READYTORUN_FILE variable. The
# presents presence of this file indicates we are ready
# to run this script. This file will contain a
# number 1 or 2 identifying the day we are
# working with.
if [ -r ${READYTORUN_FILE} ]
then
cat ${READYTORUN_FILE}
else
echo "NOT_READY"
fi
}