Problem with output file generated by script when scheduled as a cron job
Hello --
I have created a script that is designed to output to file several commands that I am planning on running on our system. The script in question is as follows:
#!/bin/bash
# The commands that follow are designed to run checks on the SamFS system on the
# spinning disk arrays, and tape libraries.
# Remove the existing samfs_system_check.txt file before proceeding further.
rm -rf samfs_system_check.txt
# Insert the date and time the commands that will be run to the output file.
date > samfs_system_check.txt
sleep 5
# Run the 'samcmd a' command to generate information on the current status