Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
Related: askubuntu.com/questions/238002/… –  Seth Feb 8 '13 at 17:07
add comment

1 Answer 1

up vote 1 down vote accepted

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?

share|improve this answer
    
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 –  cipricus 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. –  bodhi.zazen Feb 8 '13 at 18:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.