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

20051103: 20051102: uppercase gpnids output filenames?



Neil,

Unix has a command "tr" where you can convert case through replacement
such as: 
% echo UPPERcase_toLowerCase | tr -s '[A-Z]' '[a-z]'
You can use that in any shell language.

Steve Chiswell
Unidata User Support

>From: "Neil R. Smith" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200511031702.jA3H2M7s027840

>OK.
>But a convenience of scripting is using variable substitution.
>
>I call gpnids after having snagged the input radar
>data file from a dir. listing and initiated a script variable with it,
>eg., 'inputdataname'. As created by the ldm, it has uppercase letters in
>it. I'd like gpnids to output to a filename incorporating the input
>filename, so I use something like '$inputdataname' in the string for the
>gpnids 'OUTPUT' variable; eg., 'OUTPUT = f/$inputdataname.vadout'
>
>Is there a workaround you could suggest? Maybe a shell (preferably bash)
>function that would convert 'inputdataname' to all lowercase before
>initializing 'OUTPUT'?
>
>Thanks Steve,
>-Neil
>PS: why are we still suffering for VMS?
>
>On Wed, 2005-11-02 at 16:46 -0700, Unidata Support wrote:
>> Neil,
>> 
>> The output file name is processed by the GEMLIB routine
>> $GEMPAK/source/gemlib/in/inoutt.f, so the behavior is
>> common to all GEMPAK programs.
>> 
>> The problem is that you have mixed uppercase in your file name,
>> so the porocessing of the filename is converted to uppercase
>> (I'm assuming an old VMS type of convention).
>> 
>> Try specifying an output file name all in lower case.
>> 
>> Steve Chiswell
>> Unidata User Support
>> 
>> 
>> >From: "Neil R. Smith" <address@hidden>
>> >Organization: UCAR/Unidata
>> >Keywords: 200511022319.jA2NJt7s029253
>> 
>> >Steve,
>> >I've got gpnids (gempak 5.8.3a) scripted to generate VAD winds output. I
>> >find that whatever filename I set 'OUTPUT' to, the characters are
>> >converted to uppercase.
>> >
>> >eg. if during gpnids execution,
>> >
>> >OUTPUT=f / /data/vad/out.FileName
>> >
>> >then gpnids will try to write to 
>> >    /DATA/VAD/OUT.FILENAME
>> >But since these uppercase directories don't exist, the output defaults
>> >to terminal.
>> >
>> >This is a problem if I can't include full path naming with lower case
>> >directory names.
>> >
>> >Is there something I'm missing about gempak program output, or gpnids
>> >output in particular?
>> >
>> --
>> ****************************************************************************
>> Unidata User Support                                    UCAR Unidata Program
>> (303)497-8643                                                  P.O. Box 3000
>> address@hidden                                   Boulder, CO 80307
>> ----------------------------------------------------------------------------
>> Unidata WWW Service              http://my.unidata.ucar.edu/content/support 
>> ----------------------------------------------------------------------------
>> NOTE: All email exchanges with Unidata User Support are recorded in the
>> Unidata inquiry tracking system and then made publicly 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.
>> 
>
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly 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.