[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:1.8.1.12) Gecko/20080226 Fedora/2.0.0.12-1.fc8 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0 |
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 2.6.21.7-3.fc8xen #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
Description:
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.
e.g.
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.
fs
smime.p7s
Description: S/MIME Cryptographic Signature
- spaces in the shebang interpreter path,
Felix Schwarz <=
- Message not available