LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   virtual link that executes a shelscript .sh (https://www.linuxquestions.org/questions/linux-newbie-8/virtual-link-that-executes-a-shelscript-sh-61970/)

qwijibow 05-26-2003 07:09 PM

virtual link that executes a shelscript .sh
 
How can i make a link execute a shell script that runs a progam ???

ive tried to simply put the address of the script into the link

/usr/local/limewire/runLime.sh

that doesnt work, and ive tried

sh /usr/local ....

but still, nothing happens, what am i doing wrong ?

jailbait 05-26-2003 08:01 PM

chmod -x ?
 
Did you make the script executable?

artech 05-26-2003 08:19 PM

probably too easy but...
 
perhaps you lack the ./ ?

try running ./ (that is a period, followed by a backslash) before the name of the shell script.

i don't know that that will necessarily work, but it has in the past for me, and it is worth a try !

EDIT:

should look like this i think:

./usr/local/limewire/runLime.sh

0x4B 05-27-2003 01:37 PM

if you're using sh <script name> then the file will not need to be executable (sh is actually just reading it, rather than "executing" it). using ./ specifies the local directory ( . ) as the path to the file, so unless you're in the root ( / ) directory, ./usr/local.... will not work.
when you tried "sh /usr/local..." were there any errors? what did happen (eg, after you hit enter, you get the prompt again) it may be that things are running fine, and there isn't any output produced by the script.
if you're comfortable editing the file, add in a line like "echo the script is running" to the script. this will produce output that will confirm the script is actually being executed.


All times are GMT -5. The time now is 11:00 PM.