This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Mark, Try moving your EOC name to the beginning of that line for the shell script. It appears like the shell is treating everything to the end of the file as part of the gdlist << EOC. Steve Chiswell Unidata User Support On Fri, 4 May 2001, Mark Conder wrote: > Hi Steve and gembuds > > I'm trying to run a ismple script to extract gempak grids to a text file. > gdlist gives me the correct output when it runs but my problem is that it > doesn't loop at all. > Other program i have used (aobsfc and oagrid) work fine in this type of > loop but gdlist dumps me out of the script after the > "ex" command. > In other words, i can put anything in the script after the 'ex' and nothing > will happen because the script has stopped. > Any ideas on how gdlist might differ and what i can do to correct it? I've > looked at every refernce i can find and i am (obviously) stumped. > > thanks, > mark > > #! /bin/csh > # > # Gempak data extraction shell script > # > # > # > set year = 1975 > while ( $year < 1996 ) > cd /usr/nawips/gempak/data2/$year > foreach file (`ls`) > set j = 0 > while ( $j <24 ) > gdlist << EOC > GDATTIM=$j > GLEVEL=0 > GVCORD=none > GFUNC=DWPF > GDFILE=/usr/nawips/gempak/data2/$year/$file > GAREA=25.6;-105;37.5;-92.2 > PROJ=CED > SCALE=999 > OUTPUT=f//usr/nawips/gempak/data2/$year/$file:r_$j.out > r > > ex > EOC > @ j++ > end > end > @ year++ > end > > address@hidden > >