The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
setting a cron job tererez Shell Programming and Scripting 6 03-31-2008 11:47 PM
cron job setting jaydeep_sadaria Shell Programming and Scripting 2 11-21-2007 07:07 AM
Search term and output term in desired field Raynon Shell Programming and Scripting 28 03-03-2007 11:34 PM
Create a Term & Run chars on this Term the_tical High Level Programming 1 08-12-2003 06:18 PM
Setting TERM variable DPAI UNIX for Dummies Questions & Answers 1 08-16-2001 10:24 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-14-2005
steelrose
Guest
 

Posts: n/a
Cron not retaining TERM setting

Hi,

I'm sure there's something I'm simply not grasping, but I have a third-party utility (TPU) that needs to run in cron. This utility displays it's output in several formats, depending on the TERM value. cron has no TERM value by default, which results in the TPU dying with an error Sorry, I don't know anything about your "unknown" terminal.

So, I attempted to fix that by setting a value to TERM prior to the call to the TPU.

TERM=xterm;thirdPartyProduct

However, this dies with the same error. Does this mean that I'm using incorrect syntax to set and retain the TERM value? Anyone have any idea what I can do in order to pass a known term value to the TPU?


TIA.
Reply With Quote
Forum Sponsor
  #2  
Old 10-14-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
A program running under cron is not going to have a terminal at all. It is correct for TERM to not be set. Where do you expect the output to go? Setting TERM is probably a very bad idea. But if you must try that, the syntax varies with shell. Maybe this...

TERM=something; export TERM; /some/program
Reply With Quote
  #3  
Old 10-14-2005
steelrose
Guest
 

Posts: n/a
I agree setting TERM in cron is not a good idea. I think I found an alternative solution - there appears to be an optional parm for the TPU that "dumbs down" the output to plain text. That looks like it avoids the TERM emulation issue.


Thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0