This is the mail archive of the
mailing list for the Cygwin project.
Re: ksh to bash question
- To: "Matthew O. Persico" <persicom at acedsl dot com>,"cygwin" <cygwin at cygwin dot com>
- Subject: Re: ksh to bash question
- From: "Dennis Wilson" <lincwils at teleport dot com>
- Date: Fri, 20 Apr 2001 22:03:39 -0700
- References: <3AE1034A.5A7423BA@acedsl.com>
There is no FPATH equivalent in bash. Functions can be defined in three
The first you mentioned was to have the functions in .bash_profile or
.bashrc depending on the visibility you wish. The second is to define your
functions in the current script if they are really local. The third you
mentioned is to source the file that contains the functions. Obviously that
is only available for the script and sub processes it spawns.
I personally like the idea of the FPATH, but have gotten use to the other
Hope this helps. I think I am just being verbose in saying that you figured
it out. :-)
----- Original Message -----
From: "Matthew O. Persico" <firstname.lastname@example.org>
To: "cygwin" <email@example.com>
Sent: Friday, April 20, 2001 8:49 PM
Subject: ksh to bash question
> Not exactly a cygwin question, but since I am converting to Cygwin...
> In KSH, you could take each shell function, put it in its own file, set
> the FPATH envvar to point where the files are and then invoke functions.
> The first time the function is called, the FPATH is searched. If the
> file is found is is sourced and executed. Subsequent invokations are
> merely executed.
> In BASH, does one have to explicitly source all functions before first
> use or does FPATH (or its equivilent) exist? If not, where are functions
> traditionally stored and where (.bash_profile, .bashrc, etc) are they
> Matthew O. Persico
> AceDSL:The best ADSL in Verizon area
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple