LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2005, 01:38 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
how to silence script output (so I don't get so many cron logs)?


I have a script that launches a background process (using the '&'). When it does, it returns the pid, which then shows up in my cron log - every minute of every day it's doing any work.

Is there a way to stop it from returning the pid when I launch the background process?

FYI:, I load the command string into a variable & launch like so:
Code:
exec $COMMAND &
This is a tcsh script, but I could switch to bash if the answer lies there.
 
Old 03-01-2005, 01:46 PM   #2
sirclif
Member
 
Registered: Sep 2004
Location: south texas
Distribution: fedora core 3,4; gentoo
Posts: 192

Rep: Reputation: 30
just a shot in the dark, but would dirty fix be to set some dummy variable to the command.

x = exec $COMMAND &

would this then set x to the pid, and you could just dump it from there?
 
Old 03-01-2005, 04:53 PM   #3
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
Quote:
Originally posted by sirclif
just a shot in the dark, but would dirty fix be to set some dummy variable to the command.

x = exec $COMMAND &
ugly, but it works.

Thanks!
 
  


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 using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 04:19 AM
Mailing daily logs via cron? ladyath Linux - General 3 03-29-2005 11:51 PM
keeping logs from a cron job dominant Linux - Newbie 2 03-02-2004 11:37 AM
Firestarter, standard output and logs jeempc Linux - Software 0 09-23-2003 10:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:45 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
Open Source Consulting | Domain Registration