From owner-freebsd-questions@FreeBSD.ORG Fri Nov 25 07:11:37 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F262216A41F for ; Fri, 25 Nov 2005 07:11:36 +0000 (GMT) (envelope-from user@dhp.com) Received: from shell.dhp.com (shell.dhp.com [199.245.105.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7400643D58 for ; Fri, 25 Nov 2005 07:11:36 +0000 (GMT) (envelope-from user@dhp.com) Received: by shell.dhp.com (Postfix, from userid 896) id 4726C31309; Fri, 25 Nov 2005 02:11:35 -0500 (EST) Date: Fri, 25 Nov 2005 02:11:35 -0500 (EST) From: user To: freebsd-questions@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: how do I feed a script conf file variables on the command line ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2005 07:11:37 -0000 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.