Bill,
Rick's comments are correct.
piping commands together is much more efficient that separate lines.
cd ing around is not the best
This is all *nix stuff and like I said before, Google is your friend (and so is RJ).
Here's what the script does.
a invokes the shell to process the commands
b does the backup
c changes to the sqlbackups folder
d compresses the backup with 7z
e encrypts the backup
f mounts a folder on 192.168.1.201 as /mnt/bak
g creates a Date variable and fills it with today's date.
h changes directory to the mnt/bak folder
i makes a folder named today's date
j changes folder back to the folder where the compressed backup is.
k copies the compressed backup to /mnt/bak/$DATE folder
l unmouts /mnt/bak
m is commented out. It would email the compressed encrypted backup file to joesmith@shaw.ca
n deletes the raw backup
o deletes the compressed backup
p deletes the encrypted backup
Good luck,
Barry.