Current menu script

Kenneth Brody kenbrody at bestweb.net
Wed Feb 1 18:01:03 PST 2006


Quoting Jeff Harrison (Wed, 1 Feb 2006 17:24:16 -0800 (PST)):
[...]
> > > I was hoping that getenv("0") would return the
> > > name of
> > > the script, but it doesn't.  It just returns "".
> >
> > That's because there is no environment variable
> > named "0".
>
> But, when I echo $0 from within a shell script I do
> get the name of the shell script.  What I was not
> seeing was that I needed to pass the $0 on the command
> line.

"$0" does not mean "the environment variable named '0'" any more than
"$$" means "the environment variable named '$'".  Rather, they are
special shell builtins, meaning "argv[0]" and "getpid()".

[...]
> Thanks, as I mentioned to Bob, I have it working now.

Okay.  I didn't realize that "modify all of the shell scripts to pass
the information to filePro" was an option.  :-)

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list