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: <3A0048EC.EAD9C995@veritas.com> Date: Wed, 01 Nov 2000 08:46:36 -0800 From: Bob McGowan Organization: VERITAS Software X-Mailer: Mozilla 4.73 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Cygwin CC: Benoit Rochefort Subject: Re: V1.1.4: Can't exec shell script starting with ":" References: <14845 DOT 60591 DOT 632905 DOT 878707 AT scicily DOT adopt DOT qc DOT ca> <14847 DOT 10681 DOT 132934 DOT 150307 AT scicily DOT adopt DOT qc DOT ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Benoit, Some questions. From the cygcheck output, your shell is /bin/sh. Is this 'ash' or 'bash'. Also, your CYGWIN variable does not have 'ntsec' set. You may want to try setting that. My system did not have it set, and when I tried to use ash on the test script (first line is a colon), it reported 'not found' (bash worked fine with this file). Adding ntsec to the variable allowed ash to see the file as executeable and it ran when called directly (./tstfile). Benoit Rochefort wrote: > > I find a "work around" for the problem described below. I tried very > hard to find the real problem, but now I give up. > > I add this to the end of the /etc/profile file (note that this will > not work before the setting of PATH, which is described by the command > PATH="/usr/local/bin:/usr/bin:/bin${PATH:+:$PATH}:."): > > ........................................................................... > # Problem executing ":" shell scripts on first invocation of bash! > # I really try hard to find the real problem... but I didn't succeeded. > # This is a work around that should be located at least after the setting > # of PATH. It seems that the setting of PATH at the invocation of bash is > # important to find the ":" interpreter... Why??? > > if [ -z "$BASH_BUG" ]; then > BASH_BUG=1 > export BASH_BUG > exec /usr/bin/bash --login -i > fi > unset BASH_BUG > ........................................................................... > Benoit Rochefort writes: > | When I try to execute shell script starting with a ":", that fails: > | > | ############################################################################### > | $ cat helloworld > | : > | echo "Hello, world" > | $ ls -l helloworld > | -rwxr-xr-x 1 benoitr Pairing 22 Oct 30 16:51 helloworld > | $ ./helloworld > | bash: ./helloworld: No such file or directory > | $ /bin/sh < ./helloworld > | Hello, world > | ############################################################################### > | > | If I replace the first line with "#!/bin/sh", everything goes well. > | As you can see, the "x" attribute is there (as seen with ls) so it is > | really recognized as an executable file. > | > | Also, this problem doesn't arise with B20 version (It is installed on > | other work stations and I tried this little script, everything did > | well!) > | > | I know I can convert all the shell scripts easily, but I ***don't want*** > | to do that ;-) for many reasons. > | > | Can someone help me please??? Is this a known bug? I searched the best i > | could in the FAQ but searching for ":" is not really helpful... > | > | This is the output of my cygcheck -s -v -r: > | > | ############################################################################### > | > | Cygnus Win95/NT Configuration Diagnostics > | Current System Time: Mon Oct 30 17:05:37 2000 > | > | WinNT Ver 4.0 build 1381 Service Pack 4 > | > | Path: /home/toscant/bin/i686-pc-cygwin > | /home/toscant/bin > | /usr/local/bin > | /usr/bin > | /usr/bin > | > | SysDir: C:\WINNT\System32 > | WinDir: C:\WINNT > | > | CYGWIN = `notty binmode' > | HOME = `/home/toscant' > | MAKE_MODE = `unix' > | PWD = `/home/toscant' > | USER = `toscant' > | > | ;PATH = `C:\WINNT\system32;C:\WINNT' > | !D: = `D:\Applications\cygwin\packages\v1.1.4\bin' > | COMPUTERNAME = `BARI' > | COMSPEC = `C:\WINNT\system32\cmd.exe' > | CPLEXLICENSE = `/home/altmr/products/cplex/cplexlicense' > | CVSEDITOR = `xemacs -nw' > | CVSROOT = `/home/netgen/CVS-REPOSITORY' > | CVSUMASK = `007' > | EDITOR = `xemacs' > | ENSCRIPT = `--landscape --columns=2 --borders --fancy-header=mp' > | GCMCONFIG = `i686-pc-cygwin' > | GCMLEAF = `/home/toscant/local' > | GCMROOT = `/home/toscant/ref/gcm-3.0/gcm' > | HOMEDRIVE = `H:' > | HOMEPATH = `\' > | HOMESHARE = `\\SCICILY\benoitr' > | HOSTNAME = `BARI' > | HOSTTYPE = `i686' > | LESSCHARSET = `latin1' > | LESSEDIT = `%E %f' > | LOGNAME = `toscant' > | LOGONSERVER = `\\MUNICH' > | LPDEST = `shiftlogic' > | MACHTYPE = `i686-pc-cygwin' > | MANPATH = `/home/toscant/man/i686-pc-cygwin:/home/toscant/man:/usr/local/man:/usr/man' > | NUMBER_OF_PROCESSORS = `1' > | OLDPWD = `/home/toscant/ref/gcm-3.0' > | OS2LIBPATH = `C:\WINNT\system32\os2\dll;' > | OS = `Windows_NT' > | OSTYPE = `cygwin' > | PAGER = `less' > | PATHEXT = `.COM;.EXE;.BAT;.CMD' > | PRCS_REPOSITORY = `/home/netgen/PRCS-REPOSITORY' > | PRINTER = `shiftlogic' > | PROCESSOR_ARCHITECTURE = `x86' > | PROCESSOR_IDENTIFIER = `x86 Family 6 Model 7 Stepping 3, GenuineIntel' > | PROCESSOR_LEVEL = `6' > | PROCESSOR_REVISION = `0703' > | PROMPT = `$P$G' > | PUREOPTIONS = `-cache-dir=/home/toscant/pure -always-use-cache-dir=yes -auto-mount-prefix=/tmp_mnt' > | SHELL = `/bin/sh' > | SHLVL = `1' > | SYSTEMDRIVE = `C:' > | SYSTEMROOT = `C:\WINNT' > | TEMP = `/cygdrive/c/TEMP' > | TERM = `cygwin' > | TMP = `/cygdrive/c/TEMP' > | TMPDIR = `/var/tmp' > | USERDOMAIN = `ADOPT' > | USERNAME = `benoitr' > | USERPROFILE = `C:\WINNT\Profiles\benoitr' > | USER_ENV_DIR = `/home/toscant/user-env' > | WIN32DMIPATH = `C:\DMINT40\WIN32' > | WINDIR = `C:\WINNT' > | _ = `/usr/bin/cygcheck' > | TZ = `EST5EDT4,M4.1.0/2,M10.5.0/2' > | > | HKEY_CURRENT_USER\Software\Cygnus Solutions > | HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin > | HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 > | (default) = `/cygdrive' > | cygdrive flags = 0x00000020 > | HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/home/benoitr > | (default) = `H:' > | flags = 0x00000002 > | HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ > | (default) = `D:\Applications\cygwin\root' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home/netgen > | (default) = `\\scicily\netgen' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/home/toscant > | (default) = `\\scicily\toscant' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr > | (default) = `D:\Applications\cygwin\packages\v1.1.4\usr' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin > | (default) = `D:\Applications\cygwin\packages\v1.1.4\bin' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib > | (default) = `D:\Applications\cygwin\packages\v1.1.4\lib' > | flags = 0x0000000a > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19 > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro > | HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32 > | > | a: fd N/A N/A > | c: hd NTFS 2008Mb 66% CP CS UN PA FC > | d: hd NTFS 7530Mb 70% CP CS UN PA FC > | e: cd CDFS 0Mb -2147483548% CS Audio CD > | h: net NTFS 84648Mb 90% CP CS PA benoitr > | p: net NTFS 32931Mb 84% CP CS UN PA FC Data1 > | > | D:\Applications\cygwin\packages\v1.1.4\bin /usr/bin system binmode > | D:\Applications\cygwin\packages\v1.1.4\lib /usr/lib system binmode > | D:\Applications\cygwin\packages\v1.1.4\usr /usr system binmode > | D:\Applications\cygwin\root / system binmode > | \\scicily\toscant /home/toscant system binmode > | \\scicily\netgen /home/netgen system binmode > | H: /home/benoitr user binmode > | > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\bash.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\cat.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\cpp.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\find.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\gcc.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\gdb.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\ld.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\ls.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\make.exe > | Found: D:\Applications\cygwin\packages\v1.1.4\bin\sh.exe > | > | 83k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0 > | "cygitcl30.dll" v0.0 ts=2000/6/10 23:34 > | 35k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0 > | "cygitk30.dll" v0.0 ts=2000/6/10 23:34 > | 402k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0 > | "cygtcl80.dll" v0.0 ts=2000/6/10 23:30 > | 5k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0 > | 10k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0 > | "cygtclreg80.dll" v0.0 ts=2000/6/10 23:30 > | 639k 2000/06/11 D:\Applications\cygwin\packages\v1.1.4\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0 > | "cygtk80.dll" v0.0 ts=2000/6/10 23:34 > | 586k 2000/08/04 D:\Applications\cygwin\packages\v1.1.4\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 > | "cygwin1.dll" v0.0 ts=2000/8/3 20:53 > | Cygwin DLL version info: > | dll major: 1001 > | dll minor: 4 > | dll epoch: 19 > | dll bad signal mask: 19005 > | dll old termios: 5 > | api major: 0 > | api minor: 26 > | shared data: 3 > | dll identifier: cygwin1 > | mount registry: 2 > | cygnus registry name: Cygnus Solutions > | cygwin registry name: Cygwin > | program options name: Program Options > | cygwin mount registry name: mounts v2 > | build date: Thu Aug 3 20:53:46 EDT 2000 > | CVS tag: cygwin-1-1-4 > | shared id: cygwin1S3 > | > | Use -h to see help about each section > | ############################################################################### > | > | > > -- > > , __ , __ _ _ > /|/ \ o /|/ \ | | | | > | __/ _ _ _ __ _|_ |___/ __ __ | | _ | | __ ,_ _|_ > | \|/ / |/ | / \_| | | \ / \_/ |/ \ |/ |/ / \_/ | | > |(__/|__/ | |_/\__/ |_/|_/ | \_/\__/ \___/| |_/|__/|__/\__/ |_/|_/ > |\ > |/ > > ________________________ > \ \ ___ , ======= | > / Benoit Rochefort \ /__ \____\O_/_O_/__| > \ Technologies AD OPT inc.\___________\__ / / ) > / (514)345-0580 #324 / /-=_____/___/__=-| > \ benoitr AT ad-opt DOT com / O ======\| | > /_______________________/ (O) > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Bob McGowan Staff Software Quality Engineer VERITAS Software rmcgowan AT veritas DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com