importing functions from an external bash script

  • Follow


Hi all,

I'm trying to import some functions I have saved in a file named
functions.sh into a different script (protocol.sh). Can anybody show
me how to do this? I tried source functions.sh as I would do at the
terminal but source command cannot be found from within the script
protocol.sh.

thanks in advance,
Tom
0
Reply tevang3 (1) 6/12/2010 8:16:24 PM

Thomas Evangelidis <tevang3@gmail.com> wrote:
> source functions.sh

"source" is a bashism which will not work in other shells.
The standard command (with the same meaning) is ".", i.e.
.. /path/to/functions.sh
0
Reply Martin 6/12/2010 8:24:18 PM


1 Replies
1441 Views

(page loaded in 0.048 seconds)

Similiar Articles:













7/22/2012 2:18:38 AM


Reply: