sh_config

sh_config is following on from my perl_config configuration file parser, I set about writing a similar tool using ksh.
Download

sh_config Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Kevin Waldron
  • Publisher web site:
  • http://www.zazzybob.com/sh_config.html

sh_config Tags


sh_config Description

sh_config is following on from my perl_config configuration file parser, I set about writing a similar tool using ksh. sh_config is following on from my perl_config configuration file parser, I set about writing a similar tool using ksh. I wanted to parse a configuration file of variable assignments, and then use eval to assign these internally within the script, making them available for use inside the script.I could have sourced the assignments in using the "dot" operator but I decided against this - a hapless (or malicious) user could easily insert commands into the sourced file causing all manner of problems. I just wanted plain old assignments to be read - so sh_config was born.Sample Configuration Filesh_config will parse configuration files of the following general form.... # This is a comment which will be ignored# So is this# Note - whitespace doesn't matter in assignments# but a variable name cannot contain whitespace (the value can)backup_dir = /some/directoryanother_variable = some assignment # inline commentsome_var=some_val Within the download tarball, you'll find two files. The sh_config script itself, and a sample configuration file, sh_config.conf. Read the notes at the top of the script and the comments throughout for further information.


sh_config Related Software