NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Fabian, re: did you restart your LDM after making a change to .bash_profile > Yes, I restarted LDM. OK, just checking. re: > Here is the information below: > > > Contents of sat_strip.csh: > > #!/bin/csh -f > > if ($#argv < 1) then > echo "Usage: $0 outfile" > cat >/dev/null > else > cat | tail -n +3 > $1 > endif > > exit 0 I see the problem: Your script assumes that the output directory structure already exists. If that directory does not exist, the script will fail and the LDM will be forced to reap the failed PIPE entry and issue the ERROR message you are seeing from the entries in your local copy of ~ldm/etc/pqact.gempak_images. A long time ago I wrote a script that would file a product and produce a meaningful log file message about the product's receipt. Even though this is a Bourne shell script, it should serve to illustrate what your CShell script needs to do before writing the product being PIPEd in to disk: #!/bin/sh #-------------------------------------------------------------------------- # # Name: ldmfile.sh # # Purpose: file a LDM product and log the product's receipt # # Note: modify the 'LOG' file to suit your needs # # History: 20030815 - Created for Zlib-compressed GINI image filing # 20070822 - Updated to provide additional messages # 20070903 - Fixed logic bug # 20070905 - Switched to use of 'dirname' # #-------------------------------------------------------------------------- SHELL=sh export SHELL # Date+program name, log file name pathname=$1 program="`date -u +'%b %d %T'` `basename $0`[$$]:" message="FILE: $1" # Send all messages to the log file if [ $# -eq 2 ]; then logfile=$2 else logfile=logs/ldm-mcidas.log fi exec >>$logfile 2>&1 # Create output directory fname=`basename $1` dname=`dirname $1` mkdir -p $dname >/dev/null 2>&1 if [ $? -ne 0 ]; then echo $program "ERROR: unable to create directory $dname for $fname" pathname=/dev/null fi # Write the log message and output echo $program $message cat > $pathname # Done exit 0 The 'mkdir -p $dname' line is responsible for creating the output directory structure (meaning all of the subdirectories that are needed assuming, of course, that the user running the script has write permission in the top level output directory). So, as soon as you add the logic that creates the output directory structure, your script should run correctly. Cheers, Tom -- **************************************************************************** Unidata User Support UCAR Unidata Program (303) 497-8642 P.O. Box 3000 address@hidden Boulder, CO 80307 ---------------------------------------------------------------------------- Unidata HomePage http://www.unidata.ucar.edu **************************************************************************** Ticket Details =================== Ticket ID: OYU-916141 Department: Support GEMPAK Priority: Normal Status: Closed