Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: Glen Coakley To: "'cygwin AT cygwin DOT com'" Subject: error in bash's cd command Date: Wed, 28 Mar 2001 18:08:41 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C0B7E4.69B01DB0" ------_=_NextPart_000_01C0B7E4.69B01DB0 Content-Type: text/plain; charset="iso-8859-1" [administrator AT GCP36W2K /]$ cd "/d/cygwin/usr/local/bin " ### Why does this work with the space in there? [administrator AT GCP36W2K /d/.../usr/local/bin]$ echo "'`pwd`'" '/d/cygwin/usr/local/bin ' ### Note: there is a trailing space in the path [administrator AT GCP36W2K /d/.../usr/local/bin]$ ls ### ls cannot find any files [administrator AT GCP36W2K /d/.../usr/local/bin]$ cd `pwd` [administrator AT GCP36W2K /d/.../usr/local/bin]$ ls bc.exe* cygwin_indir.bat* echoping.exe* [administrator AT GCP36W2K /d/.../usr/local/bin]$ I noticed this problem because I wanted to set up a right-click action in the shell similar to the "Command Prompt Here" power toy that you get from Microsoft. So, I edit the Registry to call a DOS batch file passing it the current directory name. The batch file converted that to a Unix path that Cygwin bash could use and output that to a file. Then when the bash shell starts it checks for that file and changes to the directory in it (if it exists). Unfortunately, Windows 2000 puts a trailing space in the "%1" that is passed from a right click-invoke command on file operation, even though I have it double-quoted. I am guessing that ls is passing a directory path ending with a space to opendir() which fails. <> ________________________________ Glen Coakley, Sr. Software Engineer MQSoftware Inc., (763) 543-4845 Have you ever wonder what happens when you run "rm -rf / " but been afraid to try it? ------_=_NextPart_000_01C0B7E4.69B01DB0 Content-Type: application/octet-stream; name="cygnus_info" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="cygnus_info" =0A= Cygnus Win95/NT Configuration Diagnostics=0A= Current System Time: Wed Mar 28 16:42:57 2001=0A= =0A= WinNT Ver 5.0 build 2195 Service Pack 1=0A= =0A= Path: /usr/local/bin=0A= /usr/bin=0A= /bin=0A= /C/WINNT/system32=0A= /C/WINNT=0A= /C/WINNT/System32/Wbem=0A= /usr/bin=0A= /D/Program Files/Security/PGPNT=0A= /D/PROGRA~1/DEVELO~1/Tcl/bin=0A= /D/Program Files/MQSeries/bin=0A= /D/Program Files/MQSeries/tools/c/samples/bin=0A= /D/Program Files/Development/GNU/WinCVS 1.1=0A= /C/Program Files/Borland/Common Files/Bde=0A= /D/DB2_SQLLIB/BIN=0A= /D/DB2_SQLLIB/FUNCTION=0A= /D/DB2_SQLLIB/SAMPLES/REPL=0A= /D/DB2_SQLLIB/HELP=0A= /D/IMNNQ_NT=0A= /C/Program Files/Resource Pro Kit/=0A= /D/Program Files/Development/Visual Studio/Common/Tools/WinNT=0A= /D/Program Files/Development/Visual Studio/Common/MSDev98/Bin=0A= /D/Program Files/Development/Visual Studio/Common/Tools=0A= /D/Program Files/Development/Visual Studio/VC98/bin=0A= /D/Dev/ACE+TAO_5.1.12/bin=0A= /usr/local/bin=0A= /usr/bin=0A= /D/Util/Perl/bin=0A= /D/Util=0A= /D/Program Files/Development/Modula3/m3build/templates/bin=0A= /D/Dev/Packages/bin=0A= /D/Dev/Packages/dll=0A= =0A= SysDir: C:\WINNT\System32=0A= WinDir: C:\WINNT=0A= =0A= USER =3D `administrator'=0A= HOME =3D `/home/administrator'=0A= CYGWIN =3D `nobinmode'=0A= PWD =3D `/D/cygwin/usr/local/bin '=0A= MAKE_MODE =3D `unix'=0A= =0A= DIRCMD =3D `/a/ogne/x'=0A= MACHTYPE =3D `i686-pc-cygwin'=0A= ENV_SPACE =3D `12345678901234567890123456789012345678901234567890'=0A= PROGRAMFILES =3D `C:\Program Files'=0A= OS2LIBPATH =3D `C:\WINNT\system32\os2\dll;'=0A= LOGONSERVER =3D `\\MQNEXUS'=0A= ALLUSERSPROFILE =3D `C:\Documents and Settings\All Users'=0A= HOSTNAME =3D `GCP36W2K'=0A= SHLVL =3D `1'=0A= MSDEVDIR =3D `D:\Program Files\Development\Visual = Studio\Common\MSDev98'=0A= OLDPWD =3D `/D/cygwin/usr/local/bin '=0A= LESS =3D `-seqafix8XP?f%f:-- More --.\ ?pB(%pB\%).'=0A= GZIP =3D `-N'=0A= INCLUDE =3D `D:\Program Files\Development\Visual = Studio\VC98\atl\include;D:\Program Files\Development\Visual = Studio\VC98\mfc\include;D:\Program Files\Development\Visual = Studio\VC98\include'=0A= SYSTEMDRIVE =3D `C:'=0A= PROMPT =3D `$P$G'=0A= PROCESSOR_IDENTIFIER =3D `x86 Family 6 Model 8 Stepping 3, = GenuineIntel'=0A= PS1 =3D `\[\033]0;\w\007=0A= \033[32m\]\u@\h \[\033[33m\w\033[0m\]=0A= $ '=0A= DB2TEMPDIR =3D `D:\DB2_SQLLIB'=0A= PROCESSOR_REVISION =3D `0803'=0A= USERDOMAIN =3D `MQSOFTWARE'=0A= PROCESSOR_ARCHITECTURE =3D `x86'=0A= IMNINSTSRV =3D `D:\IMNNQ_NT'=0A= _ =3D `/home/administrator/scripts/cygnus_info'=0A= TEMP =3D `/C/DOCUME~1/gcoakley/LOCALS~1/Temp'=0A= TERM =3D `cygwin'=0A= USERNAME =3D `gcoakley'=0A= COMMONPROGRAMFILES =3D `C:\Program Files\Common Files'=0A= WINDIR =3D `C:\WINNT'=0A= ACE_ROOT =3D `D:\Dev\ACE+TAO_5.1.12'=0A= OS =3D `Windows_NT'=0A= NUMBER_OF_PROCESSORS =3D `1'=0A= USERPROFILE =3D `C:\Documents and Settings\gcoakley'=0A= !D: =3D `D:\cygwin\bin'=0A= APPDATA =3D `C:\Documents and Settings\gcoakley\Application Data'=0A= HOMESHARE =3D `\\mqnexus\gcoakley'=0A= SHELL =3D `/bin/sh'=0A= !EXITCODE =3D `00000000'=0A= LIB =3D `D:\Program Files\Development\Visual = Studio\VC98\mfc\lib;D:\Program Files\Development\Visual = Studio\VC98\lib'=0A= PATHEXT =3D `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'=0A= SYSTEMROOT =3D `C:\WINNT'=0A= CLASSPATH =3D = `D:\PROGRA~1\MQSeries\java\lib\COMIBM~2.JAR;D:\PROGRA~1\MQSeries\java\li= b\COMIBM~1.JAR;D:\PROGRA~1\MQSeries\java\lib\COMIBM~3.JAR;D:\PROGRA~1\MQ= Series\tools\javaclnt\samples\en_us;.;D:\DB2_SQLLIB\java\db2java.zip;D:\= DB2_SQLLIB\java\runtime.zip;D:\DB2_SQLLIB\java\sqlj.zip'=0A= OSTYPE =3D `cygwin'=0A= CVSROOT =3D `:pserver:gcoakley AT reddwarf:/usr/cvsroot/master'=0A= HOMEDRIVE =3D `X:'=0A= BTS_WORKSPACE_ROOT =3D `d:\dev'=0A= HOMEPATH =3D `\'=0A= COMPUTERNAME =3D `GCP36W2K'=0A= COMSPEC =3D `C:\WINNT\system32\cmd.exe'=0A= DB2INSTANCE =3D `DB2'=0A= TZ =3D `CST6'=0A= HOSTTYPE =3D `i686'=0A= IMNINST =3D `help'=0A= PROCESSOR_LEVEL =3D `6'=0A= =0A= HKEY_CURRENT_USER\Software\Cygnus Solutions=0A= HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin=0A= HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2=0A= (default) =3D `/cygdrive'=0A= cygdrive flags =3D 0x00000022=0A= HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options=0A= HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Men= uOrder\Start Menu\Programs\Cygnus Solutions=0A= (default) =3D (unsupported type)=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/=0A= (default) =3D `D:/cygwin'=0A= flags =3D 0x0000000a=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/C=0A= (default) =3D `c:'=0A= flags =3D 0x00000008=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/D=0A= (default) =3D `d:'=0A= flags =3D 0x00000008=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts = v2\/usr/bin=0A= (default) =3D `D:/cygwin/bin'=0A= flags =3D 0x0000000a=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts = v2\/usr/lib=0A= (default) =3D `D:/cygwin/lib'=0A= flags =3D 0x0000000a=0A= HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options=0A= =0A= a: fd N/A N/A =0A= c: hd NTFS 3914Mb 43% CP CS UN PA FC OpSys=0A= d: hd NTFS 15178Mb 77% CP CS UN PA FC Data=0A= e: cd CDFS 639Mb 100% CS SOMETIME=0A= m: net NTFS 58619Mb 85% CP CS UN PA FC =0A= x: net NTFS 35079Mb 33% CP CS UN PA FC =0A= z: net NTFS 58619Mb 85% CP CS UN PA FC =0A= =0A= D:\cygwin\bin /usr/bin system binmode=0A= D:\cygwin\lib /usr/lib system binmode=0A= D:\cygwin / system binmode=0A= c: /C system textmode=0A= d: /D system textmode=0A= =0A= Found: D:\cygwin\bin\bash.exe=0A= Found: D:\cygwin\bin\cat.exe=0A= Found: d:\Util\cat.exe=0A= Warning: D:\cygwin\bin\cat.exe hides d:\Util\cat.exe=0A= Found: D:\cygwin\bin\cpp.exe=0A= Found: D:\cygwin\bin\find.exe=0A= Found: d:\Util\find.exe=0A= Warning: D:\cygwin\bin\find.exe hides d:\Util\find.exe=0A= Found: D:\cygwin\bin\gcc.exe=0A= Found: D:\cygwin\bin\gdb.exe=0A= Found: D:\cygwin\bin\ld.exe=0A= Found: d:\Util\ld.exe=0A= Warning: D:\cygwin\bin\ld.exe hides d:\Util\ld.exe=0A= Found: D:\cygwin\bin\ls.exe=0A= Found: D:\cygwin\bin\make.exe=0A= Found: D:\cygwin\bin\sh.exe=0A= Found: d:\Util\sh.exe=0A= Warning: D:\cygwin\bin\sh.exe hides d:\Util\sh.exe=0A= =0A= 56k 2000/12/03 D:\cygwin\bin\cygbz21.0.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygbz21.0.dll" v0.0 ts=3D2000/11/20 17:53=0A= 82k 2001/01/21 D:\cygwin\bin\cygform5.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygform5.dll" v0.0 ts=3D2001/1/21 14:39=0A= 18k 2000/10/23 D:\cygwin\bin\cyggdbm.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cyggdbm.dll" v0.0 ts=3D2000/10/22 20:26=0A= 17k 2001/01/07 D:\cygwin\bin\cyghistory4.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cyghistory4.dll" v0.0 ts=3D2001/1/6 22:34=0A= 14k 2000/10/23 D:\cygwin\bin\cygintl.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygintl.dll" v0.0 ts=3D2000/10/23 13:02=0A= 81k 2000/12/05 D:\cygwin\bin\cygitcl30.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygitcl30.dll" v0.0 ts=3D2000/11/25 19:43=0A= 35k 2000/12/05 D:\cygwin\bin\cygitk30.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygitk30.dll" v0.0 ts=3D2000/11/25 19:43=0A= 45k 2000/10/22 D:\cygwin\bin\cygjbig1.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygjbig1.dll" v0.0 ts=3D2000/10/22 17:06=0A= 119k 2000/10/23 D:\cygwin\bin\cygjpeg6b.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygjpeg6b.dll" v0.0 ts=3D2000/10/22 18:58=0A= 53k 2001/01/21 D:\cygwin\bin\cygmenu5.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygmenu5.dll" v0.0 ts=3D2001/1/21 14:39=0A= 414k 2001/01/21 D:\cygwin\bin\cygncurses++5.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygncurses++5.dll" v0.0 ts=3D2001/1/21 14:40=0A= 299k 2001/01/21 D:\cygwin\bin\cygncurses5.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygncurses5.dll" v0.0 ts=3D2001/1/21 14:38=0A= 34k 2001/01/21 D:\cygwin\bin\cygpanel5.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygpanel5.dll" v0.0 ts=3D2001/1/21 14:38=0A= 163k 2001/02/03 D:\cygwin\bin\cygpng2.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygpng2.dll" v0.0 ts=3D2001/2/3 15:21=0A= 108k 2001/01/07 D:\cygwin\bin\cygreadline4.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygreadline4.dll" v0.0 ts=3D2001/1/6 22:34=0A= 390k 2000/12/05 D:\cygwin\bin\cygtcl80.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygtcl80.dll" v0.0 ts=3D2000/11/25 19:39=0A= 5k 2000/12/05 D:\cygwin\bin\cygtclpip80.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= 10k 2000/12/05 D:\cygwin\bin\cygtclreg80.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygtclreg80.dll" v0.0 ts=3D2000/11/25 19:39=0A= 243k 2000/10/23 D:\cygwin\bin\cygtiff3.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygtiff3.dll" v0.0 ts=3D2000/10/22 19:14=0A= 623k 2000/12/05 D:\cygwin\bin\cygtk80.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygtk80.dll" v0.0 ts=3D2000/11/25 19:43=0A= 41k 2000/11/20 D:\cygwin\bin\cygXpm-noX4.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygXpm-noX4.dll" v0.0 ts=3D2000/11/19 20:41=0A= 45k 2000/11/20 D:\cygwin\bin\cygXpm-X4.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygXpm-X4.dll" v0.0 ts=3D2000/11/19 20:45=0A= 49k 2001/02/03 D:\cygwin\bin\cygz.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygz.dll" v0.0 ts=3D2001/2/3 14:35=0A= 615k 2001/01/31 D:\cygwin\bin\cygwin1.dll - os=3D4.0 img=3D1.0 = sys=3D4.0=0A= "cygwin1.dll" v0.0 ts=3D2001/1/31 9:08=0A= Cygwin DLL version info:=0A= dll major: 1001=0A= dll minor: 8=0A= dll epoch: 19=0A= dll bad signal mask: 19005=0A= dll old termios: 5=0A= dll malloc env: 28=0A= api major: 0=0A= api minor: 34=0A= shared data: 3=0A= dll identifier: cygwin1=0A= mount registry: 2=0A= cygnus registry name: Cygnus Solutions=0A= cygwin registry name: Cygwin=0A= program options name: Program Options=0A= cygwin mount registry name: mounts v2=0A= cygdrive flags: cygdrive flags=0A= cygdrive prefix: cygdrive prefix=0A= cygdrive default prefix: =0A= build date: Wed Jan 31 10:08:38 EST 2001=0A= shared id: cygwin1S3=0A= =0A= Use -h to see help about each section=0A= ------_=_NextPart_000_01C0B7E4.69B01DB0 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ------_=_NextPart_000_01C0B7E4.69B01DB0--