[tpm] Reading config data from shell files
legrady at gmail.com
Wed Jun 28 19:41:45 PDT 2017
Several places I've worked have had really old code that was a mix of
Perl & shell scripts, and they used a shell file to do configuration.
You can set files to be run prior to each autosys command, but in cron
While some people use '. /path/to/configfile;' as the prefix to every
command, that's rather cumbersome. Some people always invoke a shell
wrapper script which loads the config, and then runs the program.
I was thinking of parsing the config file with Perl, but that seemed too
much work. Then it occured to me I could run the file in a sub-shell,
finishing with the command 'env', and it would report everything it had
found. I'm considering packaging this up as Config::Shell, since it's a
Does anyone know any existing solutions that would save my typing?
More information about the toronto-pm