From owner-freebsd-questions Sat Nov 17 13:40:34 2001 Delivered-To: freebsd-questions@freebsd.org Received: from kabel203069.kabel.utwente.nl (kabel203069.kabel.utwente.nl [130.89.203.69]) by hub.freebsd.org (Postfix) with ESMTP id 8E87837B405 for ; Sat, 17 Nov 2001 13:40:32 -0800 (PST) Received: by kabel203069.kabel.utwente.nl (Postfix, from userid 1000) id 1F00E1F84; Sat, 17 Nov 2001 22:40:30 +0100 (CET) Date: Sat, 17 Nov 2001 22:40:30 +0100 From: Rogier Steehouder To: Rod Person Cc: FreeBSD Questions Subject: Re: bash scriot function errors Message-ID: <20011117224029.A965@localhost> Mail-Followup-To: Rogier Steehouder , Rod Person , FreeBSD Questions References: <20011116192217.027e7a84.roddierod@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011116192217.027e7a84.roddierod@yahoo.com>; from roddierod@yahoo.com on Fri, Nov 16, 2001 at 07:22:17PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 16-11-2001 19:22 (-0500), Rod Person wrote: > I'm trying to run a bash scriot that contains functions. when I run > the scriot I get the error that the function in the script is not > found? How do I correct this? Do I have to place the directory that > the script is in in the path variable? I try to invoke the script like > this sh ./script.sh Only thing I can think of without seeing the script itself: Do you call the function before defining it? In shellscripts, you must define a function before you can use it. Putting them at the end of the script (like you could in perl) prompts a ": not found" error. With kind regards, Rogier Steehouder -- ___ _ -O_\ // | / Rogier Steehouder //\ / \ r.j.s@gmx.net // \ <---------------------- 25m ----------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message