[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #DXU-148885]: Detecting a GEMPAK program error



Hi Ryan,

What you're wanting sounds like standard error directed outside the script to a 
log file.  

At the top of your bash file add the lines

log=$$.log
exec > $log 2>&1

then run the script as you would normally.  output will be written to 
[ProcessID].log in the present working directory, which you can then view or 
parse for errors.  You may want to change $log to a static file and use "exec 
>> $log 2>&1" to append to this file whenever the script is run.

I tested this on some short gempak bash scripts here and it seems to work well. 
 Let me know if you encounter any problems.

Michael


> Hello,
> 
> I'm running gdedit from a Bash script.  Ideally I'd like to know if
> gdedit experiences a problem so I can take the appropriate action. Is
> that possible?  Here's a snippet of the code.
> 
> $GEMEXE/gdedit <<EOF
> 
> GDEFIL   = ./file3.out
> GDFILE   = ${sreffile}
> GPACK    =
> 
> r
> 
> ex
> 
> 
> EOF
> 
> $GEMEXE/gpend
> 
> Thanks,
> Ryan Solomon
> 
> 


Ticket Details
===================
Ticket ID: DXU-148885
Department: Support GEMPAK
Priority: Critical
Status: Open