1

Creating certain scripts to use in Lubuntu/LXDE as described here that should look like this

enter image description here

and were made to be run by shortcut as described in the last part of that answer, in order to search on the internet a selected text, I have made a mistake: I have started certain scripts with the line

#! bin/bash 

instead of

#! /bin/bash

but only discovered the error after trying to use the same scripts in a different system (Xfce in Mint), which made me search and find the answer here, which suggested the correction: and now the corrected scripts work as intended in Mint/Xfce.

But the scripts with the bad line are still working in Lubuntu as if the bad line was not that bad!

(The lxde shortcut settings are in ~/.config/openbox/lubuntu-rc.xml and they clearly indicate scripts that contain the bad line.)

How is this possible?

1

Likely that different shells/interpreters aren't overly strict, and either don't pay attention to the shebang, or don't fault when the interpreter in the shebang doesn't exist. I would imagine the second is more likely.

What shell were you using in case?

  • What shell were you using: I'm not sure: it works in Lubuntu 12.10, but not in Linux Mint 14 with Xfce 4.10 – user47206 Feb 8 '13 at 17:16
  • cduffin is correct. If you run the script with bash you will get an error bad interpreter: bin/bash: no such file or directory . If you run the script with sh or zsh it will work. – Panther Feb 8 '13 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy