Re: Bash-script – doesn't work in a launcher



2011/12/31 Leo Noordhuizen <leo.noordhuizen@xxxxxxxxx>:
Johnny,

You answered your own question I think.

Leo

Yes, I really did… :P

I tested it right after I posted my question and found out before
reading any replies, so I was somewhat embarrassed there for a while,
since I should obviously tested it BEFORE posting, then there wouldn't
be any need for posting at all…


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ


On Sat, Dec 31, 2011 at 6:39 PM, Johnny Rosenberg <gurus.knugum@xxxxxxxxx>
wrote:

2011/12/31 Steve Flynn <anothermindbomb@xxxxxxxxx>:
On 31 December 2011 17:00, Johnny Rosenberg <gurus.knugum@xxxxxxxxx>
wrote:

Of course the first line of the script is #! /bin/bash. Well, except a
few comment lines above it, but that shouldn't matter, should it?

So it's basically something like this:

# Comment
# Continuation of comment
# Another comment
# More comments

#!/bin/bash

The hash-bang line needs to be the first line in the script. Move that
to the top of the script, stick in a "set -x" if you want to see
what's happening under the covers.



--
Steve

Thanks, and also thanks to ”J” who wrote a similar reply. Yes, I moved
it to the top and now it seems to work. It still doesn't work on my
wife's computer though, I'm not sure why… She runs Ubuntu 10.04, so
maybe there are some differences there, like older bash version or
something like that. I'll take a closer look at it now.

Still I wonder why it worked with the #!/bin/bash line not at the top
when I ran it from a terminal, should it really…? Maybe because bash
is default in a terminal?


Kind regards

Johnny Rosenberg
ジョニー・ローゼンバーグ

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • Re: Mozilla apps?
    ... > Modify settings or unsubscribe at: ... If anyone tries the script, you might post back here your results. ... It appears that pastebin does not keep files forever, ...
    (Ubuntu)
  • Re: replacing GDM with a script
    ... If you just want a script to launch one of your WMs, ... I guess it's pretty simple BASH scripting...but not something I could do:) Can you tell me how I can get this script to run automatically on boot? ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: which command I should use to output sequentially,
    ... which is the best way of learning the ... script, ... vs grep for tons of uses), bash is slower. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: How to recover deleted files
    ... Please store this script under the name rm. ... When you delete a Linux file it is gone. ... > Modify settings or unsubscribe at: ...
    (Ubuntu)
  • Re: help with sed
    ... and execute awk -f t.awk your_file ... The script part with your solution ... Modify settings or unsubscribe at: ...
    (Ubuntu)