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

20040809: Gempak - Linux - Continuation lines in a here document in a csh script ...



Kevin,

Csh does not have a syntax for continuing a line from a redirected
input stream. Recall that in csh, the data between <<EOF to the line 
matching EOF is a temporary file that is being redirected to input of 
the command beofre the <<EOF.

I'm assuming there is a reason for not having the entire 
list on a single line in your script.  You could do:

set PARMLIST1='slat;slon;tmpf'
set PARMLIST2='dwpf;p06i;palt;pmsl;uknt;vknt'

then in your program input:
SFPARM = ${PARMLIST1};${PARMLIST2}

Or another solution could be:
echo -n $PARMLIST1 >! infile.nts
echo ";${PARMLIST2}" >> infile.nts

Then, in your sflist sequence, use
restore infile.nts

Steve Chiswell
Unidata User Support





>From: "Kevin Doty" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200408100414.i7A4EaSL020369

>Institution: University of Alabama at Huntsville
>Package Version: 5.7.1
>Operating System: Linux
>Hardware Information: i386-linix cluster
>Inquiry: Dear Colleague:
>
>In the text below which resides in a larger csh script, how does one use conti
> nuation lines as part of a here document in conjunction with GEMPAK command (
> specifically in this trivial example, as part of the SFPARM line)? I could no
> t find a clear example in the e-mail and document archives.  Sorry for the ha
> ssle.
>
>Many thanks,
>Kevin
>
>
>sflist << EOF
>  SFFILE   = ${file}
>  AREA     = DSET
>  SFPARM   = slat;slon;tmpf;
>             dwpf;p06i;palt;pmsl;uknt;vknt
>  DATTIM   = ${date_string}
>  OUTPUT   = f/${outfile}
>  IDNTYP   = STID
>  r
>
>  e
>EOF
>
>
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.