The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare 2 files and give uniq output rauphelhunter Shell Programming and Scripting 1 05-12-2008 01:47 PM
output from crontab run DILEEP410 Shell Programming and Scripting 0 09-07-2007 05:32 AM
bash scripting cannot executed in crontab jimmbp Shell Programming and Scripting 6 11-11-2005 08:23 AM
Shell script doesn't get executed using crontab radhika Shell Programming and Scripting 11 06-09-2005 01:28 PM
crontab output jodie Shell Programming and Scripting 4 12-01-2003 01:27 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 02-12-2008
Registered User
 

Join Date: Jan 2008
Posts: 7
Routine doesn't give output when executed in crontab

I have a script running in the crontab that gets data from a database every hour. Now I would like to execute a fortran routine to process the data in some way, after getting it and saving it locally.

I have added the following commands to my script:

set convert = ${outputdir}/Scripts/data_latest.txt

cd ${outputdir}/Scripts
f90 -o routine.x routine.f
routine.x filename.dat > $convert


The output from the routine should be written in the 'convert' file, which is data_latest.txt. The file 'filename.dat' is the input file which was received from the database. When I run the script separately, the 'convert' file is filled with output, but when the script is executed in the crontab, it is completely empty.

What should I do in order to run this routine (embedded in the script) automatically and receive my output in the output file?

Thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 02-12-2008
Registered User
 

Join Date: Jan 2008
Posts: 7
Including ">$outputfile" in your script works fine in case only one output file was originally generated by the Fortran routine. But what should I do when I would like to have two different output files generated in the program? Is it possible to discriminate between different kinds of output, or should I run the program twice (once for each file)?

Anyone with a solution? Thanks in advance.

Last edited by SharkM; 06-05-2008 at 08:22 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




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