[SWLUG] variables in scripts and configuration files
Robert McQueen
robot101 at debian.org
Fri May 2 23:50:13 UTC 2003
On Fri, May 02, 2003 at 11:20:31PM +0100, bascule wrote:
> i was just wondering, is there a reason to prefer putting info in a config
> file and have a script include that file or put the info in the script and
> change the script each time you run it, i'm not thinking of a script that
> would be installed in the system and run by different users on the same
> machine but of the sort of thing you knock up to do a simple job that you
> will repeat sometime and maybe pass the script on to others, is it just a
> question of simple scripts being edited directly and perhaps having a
> seperate conf file for complicated ones is or is there some design principle
> i'm missing?
>
> bascule
The reason for doing this is that if you're going to be installing the
script on multiple systems (either yours, or you're distributing it)
then you can update the script itself without having to edit files
directly - you can copy the new one in and the configuration is in a
seperate file. For personal scripts, or things which are unlikely to
ever need changing except in-place, it's an un-necessary overhead.
Regards,
Rob
More information about the Swlug
mailing list