Il 05/06/25 05:49, Dale ha scritto:
Howdy,
As most know, I have very basic script skills. Most of you wouldn't
even call my stuff scripts most likely. I'm not sure if they meet the
definition either. I have quite a few "scripts" that I use to do all
sorts of things. I use scripts to unlock and mount encrypted drive
sets, update backups and all that sort of thing. I'd like to add some
things to my little scripts but don't know how. I know it can be done
tho. Example. I'd like to add a section that when I run a script to
unlock and mount a drive set, I'd like it to check and make sure it
isn't already open and/or mounted. If it is not one or both of those
things, then do whichever one, or both, that are not already done. For
my backup scripts, I'd like to add a section that makes sure the drive
set for the backup is unlocked and mounted first. If not, print out
that it is not mounted and stop. I wouldn't mind learning some other
stuff to. I just want to keep the cost down a bit, used is also a
option if in real good shape. I also don't want to buy a book that
doesn't have what I need.
Advanced Bash-Scripting Guide (https://tldp.org/LDP/abs/html/)
Available for free online so you can see if all you need is in, or in
printed version from various resources. Full of code snippets to get you
started.
It's not an easy read but the fault is bash, not the author's!
bash syntax looks like it was studied to make you forget even the
simplest things in no time, if you don't use it everyday (which I don't).
raffaele