Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of the " : " in the /etc/profile (text file) PATH statement on x86 AD v8.0




On Jun 27, 2005, at 21:30 , email@hidden wrote:

Hi,
First time we have come across " : " in a PATH statement, in our case in our groups Apple Darwin v8.0's profile (a text file) edited with pico (at present). That is up until we get our successful build of X11 (latest ver) then our future latest builds of Gnome and KDE all up and working correctly. Then we'll use a Graphical Editor.

I'm not sure what your question really is, so I'll try this:
- the PATH variable is a list of directory locations that the shell
uses to locate a program when you type a "word" at its prompt:
$ foo bar
will try to locate the program 'foo' in some directory listed in your
PATH variable.
- the syntax for the PATH variable differs from shell to shell, so you
should check the man page for the shell in question.
- For 'bash/sh', it is a colon-separated list of directories, as in
$ export PATH=/foo:/bar
which sets PATH to the string "/foo:/bar"; and then
$ blob
will cause 'bash' or 'sh' to look for "/foo/blob" and then "/bar/ blob"
- For 'tcsh/csh', the syntax is, e.g.,
% setenv PATH /foo:/bar
to get the same effect.
- Note, however, that in 'bash/sh', you get
$ echo $PATH
/foo:/bar
(i.e., with colon separators), in 'tcsh/csh', you get
% echo $path
/foo /bar
(i.e., with space as the separator). Note also that for 't/ csh', PATH
and path are the same.


If that doesn't answer your questions, let us know.

Regards,

Justin

PS: in this regard, Linux, BSD, and Darwin/Mac OS X are pretty much the same: how this (the PATH variable) is treated depends only on the shell.

--
Justin C. Walker, Curmudgeon at Large
Institute for General Semantics
-----------
My wife 'n kids 'n dog are gone,
I can't get Jesus on the phone,
But Ol' Milwaukee's Best is my best friend.
-----------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-x86 mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-x86/email@hidden

This email sent to email@hidden
References: 
 >use of the " : " in the /etc/profile (text file) PATH statement on x86 AD v8.0 (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.