LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bash : About the "export" command (https://www.linuxquestions.org/questions/linux-newbie-8/bash-about-the-export-command-4175651785/)

dezix 04-09-2019 08:20 AM

Bash : About the "export" command
 
Hi,

First I'm running Debian Testing and

I want let know to other newbies that :

Code:

$ man export
answer -> no manual for this !

To access few info about look at :

Code:

$ man bash
in the "Builtin Commands" section

but it doesn't provide a lot :(


That's why I'm asking here :


What is the difference between :

Code:

$ VARIABLE=<value> <my_command>
and

Code:

$ export VARIABLE=<value>
$ <my_command>


For example if I want to use some <command> needing an other version than the default lib-xxx version

VARIABLE should be :

Code:

LD_LIBRARY_PATH=<path_to_alternative_libs_rep>

Or even, there is a better way to do so?

Thanks for explanations.

pan64 04-09-2019 08:25 AM

VARIABLE=val command
here VARIABLE is only set for that line, command will see it, otherwise not set.
export VARIABLE means the variable will be available for all the child processes/commands

dezix 04-09-2019 09:22 AM

@pan64

Thanks for answer


Please, Where to get more detailed (but affordable for non-expert) instructions about the bash builtin commands

teckk 04-09-2019 10:18 AM

https://www.gnu.org/software/bash/ma...-Builtins.html
https://www.gnu.org/software/bash/manual/

pan64 04-10-2019 02:35 AM

Quote:

Originally Posted by dezix (Post 5982863)
Please, Where to get more detailed (but affordable for non-expert) instructions about the bash builtin commands

https://www.tldp.org/LDP/Bash-Beginners-Guide/html/ (see variables)

If you really want to say thanks just click on yes.

dezix 04-10-2019 04:52 AM

I've only read the intro of the Bash Beginners Guide,
but I feel the need to quote and share this,
because it is so true...

Quote:

This is a practical guide which, while not always being too serious, tries to give real-life instead of theoretical examples.

I partly wrote it because I don't get excited with stripped down and over-simplified examples written by people who know what they are talking about,
showing some really cool Bash feature so much out of its context that you cannot ever use it in practical circumstances.

You can read that sort of stuff after finishing this book, which contains exercises and examples that will help you survive in the real world.

From my experience as UNIX/Linux user, system administrator and trainer,
I know that people can have years of daily interaction with their systems, without having the slightest knowledge of task automation.

Thus they often think that UNIX is not userfriendly, and even worse, they get the impression that it is slow and old-fashioned.
This problem is another one that can be remedied by this guide.
I really think that should be the Step 3 of Linux User assuming :

Step 1 = OS Install

Step 2 = Starting every day Desktop use to be comfortable with GUI


All times are GMT -5. The time now is 08:59 PM.