delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/08/02:38:53

From: pjfarley AT dorsai DOT org (Peter J. Farley III)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: REPOST: DJGPP/BASH: Need setup advice, please
Date: Sun, 01 Jun 1997 21:22:29 GMT
Organization: The Dorsai Embassy, Inc.
Lines: 217
Message-ID: <3391e800.9248884@news.dorsai.org>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970529105129 DOT 17046G-100000 AT is>
NNTP-Posting-Host: pjfarley.ppp1.dorsai.org
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli,

OK, I got the latest beta of BASH, and read the README.DOS file as
well as the BASH man text, but I am somehow not getting the rules for
the BASH PATH variable right.  As a simple example, I set PATH in the
BAT file I use to invoke BASH, then just try to execute the simple
pipe "set | less" with that PATH.  It does not find "less", which *is*
in "/bin", and "/bin" *is* in the PATH.  If I then reset PATH to
*just* "/bin", the "set | less" pipe works, but if I set it to
".:/bin" it does *not* work.

I am using PATH_EXPAND=Y and PATHSEPARATOR=: in the BAT file, and I
set SYSROOT as well.  I also used your suggestion of "ln -s bash.exe
sh.exe" to create a "sh.exe" in /bin.

Below are the contents of the BAT file I used, and the contents of the
"set > file" commands I execute at several points to record the
current variables.  Any info or advice on what I'm doing wrong would
be greatly appreciated.

--- BSHELL.BAT ---
@ECHO OFF
set DJDIR=H:\DJGPP
set DJGPP=H:\DJGPP\DJGPP.ENV
set SYSROOT=//h/djgpp
set HOME=/usr/users/pjf3
set PATHSEPARATOR=:
set PATH=.:/bin:%HOME%://c/://d/ut
set SHELL=/bin/sh
set CMD=//C/COMMAND.COM
set PATH_EXPAND=Y
set > setbefor.lst
%DJDIR%\bin\bash %1 %2 %3 %4 %5 %6 %7 %8 %9
set > setafter.lst
set PATH_EXPAND=
set CMD=
set SHELL=
set PATHSEPARATOR=
set HOME=
set SYSROOT=
set DJGPP=
set DJDIR=
rem Reset DOS path
call c:\cpath.bat

--- Execute BSHELL.BAT ---

H:\DJGPP>bshell
bash$ set > setbash1.lst
bash$ set | less
bash: less: command not found         <============ can't find less
bash$ PATH=/bin
bash$ echo "[$PATH]"
[/bin]
bash$ set | less                      <============ found less
BASH=/bin/bash.exe
BASH_VERSION=1.14.7(1)
BLASTER=A220 I5 D1 T4
CMD=//C/COMMAND.COM
CMDLINE=H:\DJGPP\bin\bash
COMSPEC=C:\COMMAND.COM
CONFIG=APTIVA
DJDIR=h:/djgpp
DJGPP=H:\DJGPP\DJGPP.ENV
EMU387=h:/djgpp/bin/emu387.dxe
ETC=C:\TCPDOS\ETC
EUID=42
HISTFILE=h:/djgpp/usr/users/pjf3/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/usr/users/pjf3
HOSTTYPE=PCAT
IFS=

LFN=y
LIBPATH=C:\MWD\MANAGER
MAILCHECK=60
MWPATH=C:\MWD\MANAGER;C:\MWD\MWGAMES
MWROOT=C:\MWD
:
MWROOT=C:\MWD
OPTERR=1
OPTIND=1
OSTYPE=MSDOS
PATH=/bin
PATHSEPARATOR=:
PATH_EXPAND=Y
PPID=1
PROMPT=$p$g
PS1=bash\$
PS2=>
PS4=+
PWD=
SHELL=/bin/sh
SHLVL=1
SYSROOT=//h/djgpp
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
TMPDIR=h:/djgpp/tmp
UID=42
USER=dosuser
_=
winbootdir=C:\WINDOWS
windir=C:\WINDOWS
(END)

bash$ PATH=.:/bin
bash$ echo "[$PATH]"
[.:/bin]
bash$ set | less
bash: less: command not found         <============ can't find less
bash$ exit
exit
H:\DJGPP>

--- Contents of file SETBEFOR.LST ---
CONFIG=APTIVA
TMP=C:\WINDOWS\TEMP
TEMP=C:\WINDOWS\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
COMSPEC=C:\COMMAND.COM
MWPATH=C:\MWD\MANAGER;C:\MWD\MWGAMES
BLASTER=A220 I5 D1 T4
MWROOT=C:\MWD
LIBPATH=C:\MWD\MANAGER
ETC=C:\TCPDOS\ETC
windir=C:\WINDOWS
CMDLINE=z c:\bshell.bat
DJDIR=H:\DJGPP
DJGPP=H:\DJGPP\DJGPP.ENV
SYSROOT=//h/djgpp
HOME=/usr/users/pjf3
PATHSEPARATOR=:
PATH=.:/BIN:/USR/USERS/PJF3://C/://D/UT
SHELL=/bin/sh
CMD=//C/COMMAND.COM
PATH_EXPAND=Y

--- Contents of file SETAFTER.LST ---
CONFIG=APTIVA
TMP=C:\WINDOWS\TEMP
TEMP=C:\WINDOWS\TEMP
PROMPT=$p$g
winbootdir=C:\WINDOWS
COMSPEC=C:\COMMAND.COM
MWPATH=C:\MWD\MANAGER;C:\MWD\MWGAMES
BLASTER=A220 I5 D1 T4
MWROOT=C:\MWD
LIBPATH=C:\MWD\MANAGER
ETC=C:\TCPDOS\ETC
windir=C:\WINDOWS
DJDIR=H:\DJGPP
DJGPP=H:\DJGPP\DJGPP.ENV
SYSROOT=//h/djgpp
HOME=/usr/users/pjf3
PATHSEPARATOR=:
PATH=.:/BIN:/USR/USERS/PJF3://C/://D/UT
SHELL=/bin/sh
CMD=//C/COMMAND.COM
PATH_EXPAND=Y
CMDLINE=H:\DJGPP\bin\bash

--- Contents of file SETBASH1.LST ---
BASH=/bin/bash.exe
BASH_VERSION=1.14.7(1)
BLASTER=A220 I5 D1 T4
CMD=//C/COMMAND.COM
CMDLINE=H:\DJGPP\bin\bash
COMSPEC=C:\COMMAND.COM
CONFIG=APTIVA
DJDIR=h:/djgpp
DJGPP=H:\DJGPP\DJGPP.ENV
EMU387=h:/djgpp/bin/emu387.dxe
ETC=C:\TCPDOS\ETC
EUID=42
HISTFILE=h:/djgpp/usr/users/pjf3/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/usr/users/pjf3
HOSTTYPE=PCAT
IFS=

LFN=y
LIBPATH=C:\MWD\MANAGER
MAILCHECK=60
MWPATH=C:\MWD\MANAGER;C:\MWD\MWGAMES
MWROOT=C:\MWD
OPTERR=1
OPTIND=1
OSTYPE=MSDOS
PATH=.:/BIN:/USR/USERS/PJF3://C/://D/UT
PATHSEPARATOR=:
PATH_EXPAND=Y
PPID=1
PROMPT=$p$g
PS1=bash\$
PS2=>
PS4=+
PWD=
SHELL=/bin/sh
SHLVL=1
SYSROOT=//h/djgpp
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
TMPDIR=h:/djgpp/tmp
UID=42
USER=dosuser
winbootdir=C:\WINDOWS
windir=C:\WINDOWS

---------------------

TIA for your help in ending my confusion.

----------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org)

- Raw text -


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