LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2019, 08:20 AM   #1
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 98

Rep: Reputation: Disabled
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.
 
Old 04-09-2019, 08:25 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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
 
1 members found this post helpful.
Old 04-09-2019, 09:22 AM   #3
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: Disabled
@pan64

Thanks for answer


Please, Where to get more detailed (but affordable for non-expert) instructions about the bash builtin commands
 
Old 04-09-2019, 10:18 AM   #4
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,145
Blog Entries: 6

Rep: Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832Reputation: 1832
https://www.gnu.org/software/bash/ma...-Builtins.html
https://www.gnu.org/software/bash/manual/
 
Old 04-10-2019, 02:35 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
Quote:
Originally Posted by dezix View Post
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.
 
1 members found this post helpful.
Old 04-10-2019, 04:52 AM   #6
dezix
Member
 
Registered: Sep 2017
Location: Frog's Land
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash: export: `=': not a valid identifier - bash: export: `0': not a valid identifier PClOStinspace Linux - General 4 01-24-2014 01:11 PM
How to "export" out put of command "date"? hbchok Linux - Newbie 6 11-03-2012 04:14 AM
.bash_profile, "-bash: export: command not found" Squall90 Slackware 9 05-16-2012 03:45 PM
why should we export COMPTOP and what does !export do ? shaiva Linux - Newbie 5 11-03-2009 03:44 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration