Date: Fri, 25 Nov 2005 02:11:35 -0500 (EST) From: user <user@dhp.com> To: freebsd-questions@freebsd.org Subject: how do I feed a script conf file variables on the command line ? Message-ID: <Pine.LNX.4.21.0511250208420.8180-100000@shell.dhp.com>
next in thread | raw e-mail | index | archive | help
Ok, let's say I have a shell script named script.sh, and script.sh sucks in a file /etc/file.conf that contains nothing but variable declarations like: SETTING1=setting1 SETTING2=setting2 and so on. Very simple. My question is, what if I want to feed the script a setting on the command line ? Normally I run the script: script.sh -x -v -e -r and it looks for /etc/file.conf and sucks in all the variables. But I want to: script.sh -x -v -e -r SETTING1='setting1' for some reason this is not working. I am in the FreeBSD csh shell when I attempt this (FWIW). I just want to be able to quickly bypass the conf file, using a single command line. Thanks.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.21.0511250208420.8180-100000>