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

[LDM #NUV-722205]: FILE without full path name



Brian,

> I've never really been all that good with regular expressions
> unfortunately.  I usually end up figuring out the correct cryptology in
> pqact.conf eventually through trial and error, but not this time.

I put together a terse summary of extended regular expressions at
<http://www.unidata.ucar.edu/software/ldm/ldm-current/basics/ERE.html>.
It also has a link to the definitive web pages.

> My dilemma is this ... we're receiving products in our LDM pq and
> sometimes the product contains a full path name and other times it
> doesn't.  Specifically, the file name that shows up when doing an
> "ldmadmin watch" is sometimes of the form
> /usr/people/ldm/data/goes/yyyymmdd_hhmm_sport_goesimager_conus_icecap.gz
> and other times it is simply
> yyyymmdd_hhmm_sport_goesimager_conus_icecap.gz
> 
> I'm trying to work with the folks that send us these products to ensure
> they strip the full path name before they do a pqinsert on their end,
> however, I was wondering if there was a way to just make the pattern in
> pqact.conf "smart" so that it doesn't matter whether the product comes
> across with or without the full path name?
> 
> I tried using the $ (End of string character) like this:
> 
> EXP   $(........_...._sport_goesimager_conus_icecap.gz)
> FILE  /home/ldm/data/ICECAP/\1
> 
> But, then when I do an "ldmadmin pqactcheck", I get a regcomp error

Because the dollar-sign means end-of-string, it would have to be at the
end of the regular expression.

> Any help you can provide is greatly appreciated.

I think this will do what you want:

EXP (........_...._sport_goesimager_conus_icecap.gz)$
        FILE /home/ldm/data/ICECAP/\1

Be sure to separate the fields with tabs and not spaces.

You can verify the regular expression via the command 
"pqcat -vl- -o 3600 -f EXP -p ... >/dev/null"

> Thanks,
> Brian Hoeth
> NWS Spaceflight Meteorology Group
> Houston, TX

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: NUV-722205
Department: Support LDM
Priority: Normal
Status: Closed


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.