We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You do not need to run env externally, because the whole environment is already available in the hash %ENV. There is, however, another flaw in your solution: bash does NOT guarantee that SHELL is set at all. I don't think there is a foolproof way to find out which shell you have. One possibility to test for bash would be with the following command: We can't use %ENV here, because BASH_VERSION is not an environment variable. Another possibility is to use the current process id ($$) and the output of ps and see how the current process was called, assuming that if it is something like 'bash' or '-bash', it is probably a bash shell.
-- Ronald Fischer <ynnor@mm.st> In reply to Re: Environment discovery under Linux
by rovf
|
|