Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2001 22:40:30 +0100
From:      Rogier Steehouder <r.j.s@gmx.net>
To:        Rod Person <roddierod@yahoo.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: bash scriot function errors
Message-ID:  <20011117224029.A965@localhost>
In-Reply-To: <20011116192217.027e7a84.roddierod@yahoo.com>; from roddierod@yahoo.com on Fri, Nov 16, 2001 at 07:22:17PM -0500
References:  <20011116192217.027e7a84.roddierod@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 "<functionname>: 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011117224029.A965>