PATH=$(getconf PATH), but PATH for getconf?

PATH=$(getconf PATH), but PATH for getconf?

Post by Michael Wa » Wed, 30 May 2001 14:11:30



To use the "standard" utilities, I need to
define PATH as PATH=$(getconf PATH), but
how do I define PATH for getconf?

In Solaris /bin/ksh, getconf is not built-in.

PATH=/bin
PATH=$(getconf PATH)
?

How can I make it works on Solaris, Linux, AIX, etc?

Thanks.

 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Erik Max Franci » Wed, 30 May 2001 14:47:13



> To use the "standard" utilities, I need to
> define PATH as PATH=$(getconf PATH), but
> how do I define PATH for getconf?

Try something like

        PATH=$(PATH=/usr/local/bin getconf PATH)

presuming that getconf is really supposed to be invoked with one
argument that is the string "PATH" (I don't know anything about
getconf).

--

 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Hell is other people.
\__/ Jean-Paul Sartre
    The laws list / http://www.alcyone.com/max/physics/laws/
 Laws, rules, principles, effects, paradoxes, etc. in physics.

 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Kjetil Torgrim Homm » Wed, 30 May 2001 17:25:55


[Michael Wang]

Quote:>   To use the "standard" utilities, I need to
>   define PATH as PATH=$(getconf PATH), but
>   how do I define PATH for getconf?

>   In Solaris /bin/ksh, getconf is not built-in.

>   PATH=/bin
>   PATH=$(getconf PATH)
>   ?

>   How can I make it works on Solaris, Linux, AIX, etc?

On Solaris and Red Hat Linux, getconf is in /usr/bin.  On IRIX, it is
/usr/sbin.  Just play it safe:

PATH=$(PATH=/usr/sbin:/usr/bin:/sbin:/bin getconf PATH)

Kjetil T.

 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Michael Wa » Wed, 30 May 2001 21:23:47



Quote:

>Try something like

>    PATH=$(PATH=/usr/local/bin getconf PATH)

>presuming that getconf is really supposed to be invoked with one
>argument that is the string "PATH" (I don't know anything about
>getconf).

Is there any unix system that does not have getconf?
 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Kjetil Torgrim Homm » Wed, 30 May 2001 22:07:34


[Michael Wang]

Quote:>   Is there any unix system that does not have getconf?

Define "unix system".  All Unix(tm) systems have getconf, since it's
specified in the standard.  Older unixen don't have it (SunOS 4.x,
Ultrix, ...), but these systems don't come with a POSIX shell either.

Kjetil T.

 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Drazen Kac » Wed, 30 May 2001 22:36:08



> To use the "standard" utilities, I need to
> define PATH as PATH=$(getconf PATH), but
> how do I define PATH for getconf?

> In Solaris /bin/ksh, getconf is not built-in.

> PATH=/bin
> PATH=$(getconf PATH)
> ?

> How can I make it works on Solaris, Linux, AIX, etc?

You can't. Not portably, at least. You'd have to have bootstrap code for
each OS separately.

--
 .-.   .-.    Sarcasm is just one more service we offer.
(_  \ /  _)

     |

 
 
 

PATH=$(getconf PATH), but PATH for getconf?

Post by Cyrille Lefevr » Thu, 31 May 2001 05:52:18


[snip]

Quote:> Is there any unix system that does not have getconf?

at least, *BSD don't have it... yet.

fu2 cus.

Cyrille.
--


Supprimer "%no-spam" et ".invalid" pour me repondre. | about who it chooses
Remove "%no-spam" and ".invalid" to answer me back.  | to be friends with.

 
 
 

1. add in the PATH a path if not present in the PATH

I look for a function in POSIX shell. this function must add path in the
$PATH if it isn't present.
by example:
I want add /bin in PATH
echo $PATH
--> /bin:/usr/bin
/bin is in the PATH then i don't add /bin
If I want add /usr/local/bin
/usr/local/bin isn't in the PATH then I add:
PATH=${PATH}:/usr/local/bin

  gaetan.schneller.vcf
< 1K Download

2. PPP

3. ksh: add path to $PATH only when ot yet in $PATH

4. download pdf2ps

5. zsh's 'typeset -U path' wipes out path/PATH

6. Ethernet Card won't work

7. set path = "$path" hoses path in tcsh -- why???

8. Cnews + tin

9. How to expand paths in $PATH like "~/bin" to full path?

10. Relative path to Absolute path

11. tcsh PATH, path, and ~: bug or feature?

12. how to add a path to my path variable

13. need general help with setting paths & man paths for apps