Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-26-2003, 08:09 PM   #1
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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


that doesnt work, and ive tried

sh /usr/local ....

but still, nothing happens, what am i doing wrong ?
Old 05-26-2003, 09:01 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
chmod -x ?

Did you make the script executable?
Old 05-26-2003, 09:19 PM   #3
LQ Newbie
Registered: May 2003
Location: TX
Distribution: Redhat 8
Posts: 1

Rep: Reputation: 0
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 !


should look like this i think:


Last edited by artech; 05-26-2003 at 09:27 PM.
Old 05-27-2003, 02:37 PM   #4
Registered: May 2003
Location: Nashville TN, USA
Distribution: Debian (I'm unstable)
Posts: 117

Rep: Reputation: 15
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
c program that executes during a certain amount of time jagman Programming 6 04-13-2005 10:22 AM
OpenBSD 3.6 install D-Link 300T / D-Link DFE 528TX lesleyb *BSD 2 04-01-2005 07:29 PM
Terminal Executes unwanted command at openning blames Linux - General 4 12-28-2004 05:16 PM
"permission denied" error when cron job executes jillu Linux - Newbie 11 11-02-2004 02:19 PM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 11:23 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration