My $PATH looks like this:
/home/torbjorr/deployed/vector/x86_64-GNU%2fLinux:/home/torbjorr/deployed/typewriter/x86_64-GNU%2fLinux:/home/torbjorr/deployed/mustudio/x86_64-GNU%2fLinux:/home/torbjorr/deployed/mathext/x86_64-GNU%2fLinux:/home/torbjorr/deployed/doxymax/x86_64-GNU%2fLinux:/home/torbjorr/deployed/c2tex/x86_64-GNU%2fLinux:/home/torbjorr/deployed/x86_64-GNU%2fLinux/wand:/home/torbjorr/deployed/x86_64-GNU%2fLinux/spellesc:/home/torbjorr/deployed/x86_64-GNU%2fLinux/projinit:/home/torbjorr/deployed/x86_64-GNU%2fLinux/herbs:/home/torbjorr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
In bash, I can without problem invoke wand located in
/home/torbjorr/deployed/x86_64-GNU%2fLinux/wand
like
$ wand
(i) Mål från "main.cpp" har registrerats
(i) Skapar katalog "__wand_targets_dbg"
(i) Kör g++ "main.cpp" -fpic -L"/home/torbjorr/deployed" -g -Wall -std=c++11 -I"/home/torbjorr/deployed" -o "__wand_targets_dbg/cb-template
However, in bourne shell compatibility mode, wand cannot be found:
$ wand
sh: 2: wand: not found
It seems like the problem is the % sign in these paths. This sign has been added by URL encoding so the name "GNU/Linux" can be used in the directory name even though it is not a valid filename. Is it possible to get the name working in sh, or make the sh command work as bash. That is, make bash behave the same even though it was invoked with the /bin/sh command, which symlinks to bash anyway.
sh
(it is ok inbash
andzsh
though). Directly calling the executable works insh
; really strange. – Rmano Apr 28 '14 at 18:22