I would like to automate the following commands into a script. What I cannot find in the manuals is how to test If a command completed with a status of success. I would like to do this test between commands so the next command only executes if the previous one succeeds. If a command fails, I would like the script to end. Below are the commands.
backup stgpool MDOR_DISK_STORAGE_POOL ONSITE_TAPES_2ND_COPY MAXPR=3 backup stgpool MDOR_DISK_STORAGE_POOL OFFSITE_TAPES_DAILY backup stgpool MDOR_DISK_STORAGE_POOL OFFSITE_TAPES_WEEKLY delete volhistory type=dbbackup todate=-5 ba db dev=ltotape type=full ba db dev=ltotape type=full ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager at postmaster at dor.state.ma.us. **********************************************************************
