LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-10-2003, 04:43 PM   #1
lukas_z
LQ Newbie
 
Registered: Jul 2003
Location: Czech Republic
Distribution: Mandrake 9.1
Posts: 18

Rep: Reputation: 0
pipe in a cgi script


Hi all,
so my scenario goes like this: I got an app that writes something into a log file. For some reason, i want the log file to be monitorable through a web browser. So I made a simple cgi script, with the "tail -f my_app.log" command in the very end. This works just fine.
Then I want another script that will show only lines containing particular text. So I probably want to do something like "tail -f my_app.log | grep my_string", but this does not work - it gives no output in a browser window.
The strange thing (according to me at least ;-)) is, that doing (in a terminal):
su apache
./my_cgi_script_with_grep.cgi
works fine!!! Why the hell it does not work in a browser window? There are no complaints in syslogs, and no output to stderr ( 2>&1 does no show anything neither).
 
  


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 pipe input - bash mostly laikos Programming 4 11-09-2008 06:14 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-12-2005 12:08 AM
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 12:43 PM
cgi uaseradd script help newuser455 Programming 3 01-29-2005 07:29 PM
Protect a CGI Script? LiveMatter Programming 13 09-24-2002 09:41 AM


All times are GMT -5. The time now is 06:47 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