[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

spaces in the shebang interpreter path

From: Felix Schwarz
Subject: spaces in the shebang interpreter path
Date: Sun, 11 May 2008 15:31:18 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20080226 Fedora/ Thunderbird/ Mnenhy/

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic uname output: Linux ws2.schwarz.lokal #1 SMP Fri Mar 28 20:16:21 CET 2008 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu

Bash Version: 3.2
Patch Level: 33
Release Status: release

        I'm not able to specify an interpreter in a shebang line if the path
        to this interpreter contains spaces. I'm not quite sure if this is
        considered a bug or if its just there for backwards compatibility but
        at least quoting etc. does not work for me.

        The directory "/home/fs/foo bar" contains the executable bin/python

        Now I have this python script
        #!/home/fs/foo bar/bin/python
        print 'foo bar'

        The shebang above obviously can't work because bash tries to find the
        executable named 'foo' and pass 'bar/bin/python' as a parameter.
        Therefore I tried to escape the path like in other bash scripts
        ('#!/home/fs/foo\ bar/bin/python') but this doesn't work either.
        Quotes (#!"/home/fs/foo bar/bin/python") don't cut it.

        IMHO bash should support every valid unix path for shebang lines.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]