LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Research on bash shell (https://www.linuxquestions.org/questions/linux-general-1/research-on-bash-shell-649047/)

snorris 06-13-2008 08:15 AM

Research on bash shell
 
I am researching bash for a block of training. The issue I have is in regard to the difference in content when comparing the env (external) command results with the declare (built-in) command. declare contains a number of functions which are not a part of env.

My question is: where do those functions originate?

Are they embedded in the bash command, itself, or is there a configuration file where they are stored between sessions?

I realize that this may seem to be a waste of a line of inquiry, and apologize in advance - I just don't like not being able to understand things.

Best regards,

Sam Norris

pixellany 06-13-2008 08:37 AM

man declare
---shows that "declare" is a BASH built-in
man bash
---gives you the syntax for the declare command
man env
---shows that env is an external command and gives you the syntax.

If I enter "env", I get a list of environmental variables, not functions. "declare" seems to do the same thing, but the man page also talks about functions.

I suggest that you get a copy of the Advanced Bash Scripting Guide and see what that says. http://tldp.org


All times are GMT -5. The time now is 04:00 PM.