delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/02/12:21:01

From: franl AT world DOT std DOT com (Francis Litterio)
Subject: bash reverts to NT-style PATH in subshells.
2 Jan 1997 12:21:01 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199701021925.AA06768.cygnus.gnu-win32@world.std.com>
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Using the 17.1 release, create this shell script (called showpath):

    #!/bin/sh
    echo $PATH
    ls

and you'll see this problem:

    bash$ echo $PATH
    /franl/bin:/bin:/WINNT/system32:/WINNT:/dos
    bash$ ./showpath
    c:\franl\bin;c:c:\apps\cygwin32\H-i386-cygwin32\bin;C:\WINNT\system32;C:\WINNT;c:\dos
    ./showpath: ls: command not found

(Note: I have c:/apps/cygwin32/H-i386-cygwin32/bin mounted on /bin.)
Notice how bash's UNIXification of the PATH has been lost, and along
with it we lose the ability to use commands like ls from within the
script.
-- 
Francis Litterio                     PGP Key Fingerprint:
franl AT world DOT std DOT com                  02 37 DF 6C 66 43 CD 2C
http://world.std.com/~franl/         10 C8 B5 8B 57 34 F3 21

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019