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.
Leon, >Date: Thu, 08 Sep 2005 14:13:50 -0500 >From: Leon Minton <address@hidden> >Organization: NOAA >To: Steve Emmerson <address@hidden> >Subject: Re2: 20050908: Avoiding certain products via pqact.conf The above message contained the following: > After thinking on it a little bit, rather than trying to use regular > expressions, I could to something like: > > WMO > ^(....[0-9][0-9]|....[0-9]) (K|T|P|N)(...)(.*)/p(...)(.|..|...)$ > PIPE > -strip -close fileExceptRrsDpaRcm \3 \5 \6 > > where the "fileExceptRrsDpaRcm" script could be > > if test $2 = RRS -o $2 = DPA -o $2 = RCM; then Ah! The substrings you didn't want are in \5. > cat >/dev/null > else > cat >/home/ldm/data/$1/$2$3 > fi That would work. You could still simplify the entry to WMO ^....[0-9][0-9]|....[0-9] (K|T|P|N)(...).*/p(...)(.|..|...)$ PIPE -strip -close fileExceptRrsDpaRcm \2 \3 \4 and use the same script above. Regards, Steve Emmerson