Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: CLI running .sh file

  1. #1
    Join Date
    Jul 2006
    Location
    Omnipresent
    Beans
    143
    Distro
    Ubuntu 13.04 Raring Ringtail

    CLI running .sh file

    Ok trying to run JSMS.sh

    It exists in /home/USER/JSMS/JSMS.sh

    I want to create a launcher for it on the desktop, but I cant get it to work. What command should I be using there?


    If that isn't possible, I've been trying to run the program from the command line but it is strange. If I type: cd JSMS then sh JSMS.sh it works, but if I type cd JSMS | sh JSMS.sh it doesnt work.

    Any ideas? thanks guys.
    Last edited by squee; May 1st, 2009 at 10:47 PM. Reason: too late for me to spell properly, need sleep!
    Laptop: Toshiba T130 1.3 GHz U2700 320GbHDD -- Things not working on 12.10: Screen dimming (works only on CLI sudo setpci -s 00:02.0 F4.B=90). Contact me with solutions please!

  2. #2
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: CLI running .sh file

    Does it run if you run this?

    Code:
    sh ~/JSMS/JSMS.sh
    Otherwise, make sure JSMS.sh has an executable permissions.

    Code:
    cd ~/JSMS
    chmod 755 JSMS.sh
    cd
    ~/JSMS/JSMS.sh
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  3. #3
    Join Date
    Jul 2006
    Location
    Omnipresent
    Beans
    143
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: CLI running .sh file

    I've made it executable but still wont run with those commands.

    Edit: It does work now if I do sh ~/JSMS/JSMS.sh in the terminal, but not as a launcher.
    Last edited by squee; May 1st, 2009 at 11:14 PM. Reason: updated info
    Laptop: Toshiba T130 1.3 GHz U2700 320GbHDD -- Things not working on 12.10: Screen dimming (works only on CLI sudo setpci -s 00:02.0 F4.B=90). Contact me with solutions please!

  4. #4
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: CLI running .sh file

    Which command, ~/JSMS/JSMS.sh?
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  5. #5
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: CLI running .sh file

    How did you create a launcher for it?
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  6. #6
    Join Date
    Jul 2008
    Location
    Columbus, Ohio
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: CLI running .sh file

    Do you have this at the top of the file?
    Code:
    #!/bin/bash
    Bios Elemental - My Blog | Useful Ubuntu and WINE related help as well as general Geek Things.

  7. #7
    Join Date
    Jul 2006
    Location
    Omnipresent
    Beans
    143
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: CLI running .sh file

    "
    #!/bin/sh
    "
    is at the top of the file. Should I replace it?


    created launcher by rightclicking on desktop...
    Laptop: Toshiba T130 1.3 GHz U2700 320GbHDD -- Things not working on 12.10: Screen dimming (works only on CLI sudo setpci -s 00:02.0 F4.B=90). Contact me with solutions please!

  8. #8
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: CLI running .sh file

    What did you put in for the Command: field?
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

  9. #9
    Join Date
    Jul 2006
    Location
    Omnipresent
    Beans
    143
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: CLI running .sh file

    Command field: sh ~/JSMS/JSMS.sh
    Laptop: Toshiba T130 1.3 GHz U2700 320GbHDD -- Things not working on 12.10: Screen dimming (works only on CLI sudo setpci -s 00:02.0 F4.B=90). Contact me with solutions please!

  10. #10
    Join Date
    Oct 2005
    Location
    Jacksonville, FL
    Beans
    29,420

    Re: CLI running .sh file

    Remove the sh in front, just ~/JSMS/JSMS.sh.
    In the world of Linux, who needs Windows and Gates...

    Got most of my golden beans at an auction on eBay (with a couple of free drinks).

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •