Re: export which is correct syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 04, 2014 at 10:37:48PM +1030, Tim wrote:
> Frank Murphy:
> > > 1: export TMPDIR=/var/tmp
> > > 2: export TMPDIR=$TMPDIR:/var/tmp
> 
> Suvayu Ali:
> > Depends on what you want to do.  If you want to overwrite the variable,
> > use (1).  If you want to add (prepend) to the variable, use (2).
> 
> Wouldn't that actually be an append - add onto the end of the existing
> variables, as opposed to insert before the existing variables (prepend).

This would be append:

3: export TMPDIR=/var/tmp:$TMPDIR

This is how I understand it; if a matching path is found, it is
considered for the task at hand.  So prepend (front) would mean "I want
this to be considered before everything else", whereas append (back)
would mean "I want this to be considered when everything else fails".

The easiest example to see it in action is the PATH variable.

Does that make sense?

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux