LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-13-2011, 05:59 AM   #1
sunlinux
Member
 
Registered: Feb 2006
Distribution: RHCL 5
Posts: 229

Rep: Reputation: 30
shell script not running


I am calling a shell script from cgi on local machine itself

in cgi:
my $st="my.sh one two"; (one two parameters)
system ($st);

above not working in 2.6.18-194.el5 and there is no error in logs as well. but same is working on Solaris in one go .

i am using below path in shell script
#!/bin/bash
I also tried /bin/sh
 
Old 12-13-2011, 06:04 AM   #2
maradnus
Member
 
Registered: Oct 2008
Location: Yellagiri Hills
Distribution: Fedora
Posts: 87

Rep: Reputation: 15
Chmod 755 file

Check the file permission. That is set execute permission for the file...
 
Old 12-13-2011, 07:04 AM   #3
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
will "my.sh" be in the path? You didn't specify the full path to that file, how will it know where to find it?
I would start with putting some logging at each step of your cgi script to see where it gets to and take it from there.
Once you know which line is failing, then you know what to focus on.
Don't assume Solaris has the exact same syntax as Linux. Also don't assume the environments work exactly the same.
 
  


Reply


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
Shell Script running in another shell script and then exit dreamervlk Linux - General 3 09-16-2011 07:40 AM
Shell Script: Getting signal handlers to work when running an application by script pkjss Programming 4 09-14-2011 05:23 AM
running shell script within expect script xombboxer Linux - Newbie 2 05-01-2011 01:42 PM
running a shell script which invokes another shell program!!! raghu123 Programming 1 08-04-2008 10:10 AM


All times are GMT -5. The time now is 06:35 AM.

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