Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: run .sh instead of view

  1. #11
    Join Date
    Sep 2007
    Location
    Vienna
    Beans
    234

    Re: run .sh instead of view

    so far i tried
    Code:
    online    in home, run "online"     resulting in gedit
    online.sh in home, run "online.sh"  resulting in gedit
    online.sh in bin,  run "online.sh"  resulting in error no such file
    now i tried
    Code:
    online    in bin, run "online"      script is executed!
    although i find that behaviour a bit weird i am glad i have what i want now, thank you for your patience!

  2. #12
    Join Date
    Sep 2007
    Location
    Vienna
    Beans
    234

    Re: run .sh instead of view

    um, shouldn't i be able to mark this thread as solved? i can't find the option under thread tools...

  3. #13
    Join Date
    Apr 2005
    Location
    /home/laire
    Beans
    1,032
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: run .sh instead of view

    Jst an FYI,
    its normal behavior to have to use
    Code:
    ./
    in front of .sh files to run them

    so
    Code:
    ./online.sh
    isn't strange behavior in any sense.

    Weird about the Solved issue. "Thanks" disappeared a while back too...

  4. #14
    Join Date
    Jan 2008
    Location
    /us/al/home/mb_webguy
    Beans
    2,339
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: run .sh instead of view

    Quote Originally Posted by Andreas1 View Post
    so far i tried
    Code:
    online    in home, run "online"     resulting in gedit
    online.sh in home, run "online.sh"  resulting in gedit
    online.sh in bin,  run "online.sh"  resulting in error no such file
    now i tried
    Code:
    online    in bin, run "online"      script is executed!
    although i find that behaviour a bit weird i am glad i have what i want now, thank you for your patience!
    It doesn't look to me like you're actually removing the .sh extension from the file. Try "mv online.sh online" in the terminal from the directory in which the file is located (or just rename it in nautilus), then just type "online" to run it.

  5. #15
    Join Date
    Sep 2007
    Location
    Vienna
    Beans
    234

    Re: run .sh instead of view

    Quote Originally Posted by mb_webguy View Post
    It doesn't look to me like you're actually removing the .sh extension from the file. Try "mv online.sh online" in the terminal from the directory in which the file is located (or just rename it in nautilus), then just type "online" to run it.
    oh, sorry, i just used code tags to have a table with fixed font here, this is not code, i did remove the extension in nautilus.

  6. #16
    Join Date
    Nov 2009
    Beans
    2

    Re: run .sh instead of view

    I have had the same issue.
    Andreas1, You helped me a lot in resolving that!
    AFAIK it's enough to call the script like this:
    Code:
    ./script-name
    Sounds like SOLVED to me.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •