Quote:
???
Why not give the requested value as an argument of your script?
(will avoid the editing phase...)
Good question - the script generally is a self contained script that may have to be executed by someone who may not know the valid value for that specific application.
I am an Oracle DBA. The specific scripts I'm dealing with are for one specific system. The backup parm is a sched id. For that one specific system there are three values. Other systems I have range from one completely different sched id to 5 differing sched ids. All specific to the system/DB instance they're backing up. Somewhere around 50 different ones just for the DBs I'm primary on. We're a fairly large organization, we have 15+ DBA's so you get an idea as to just the number of sched ids we'd have to remember.
I try to write my scripts so that all you have to do is execute the script without having to know the specifics to that system.
We source an instance specific <SID>.env file for specific environment variables. I could set them there but would still multiple edits if a sched id changes again.
Putting those environment variables common to several scripts known to have a history of being changed (like the sched ids for our backups) in a file that multiple scripts get the value from cuts down the number of edits made (and consequently the number of possible mistakes I could make).
Our scripting guru decided that Oregon was a better place to go so I'm having to learn more now.
Thanks.
Wolf Brother