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

[LDM #DIL-286118]: pqact EXEC for creating sym links



Neil,

The single EXEC entry would be something like this:

    NEXRAD<tab>^SDUS[2357]. .... 
([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(...)
    <tab>EXEC<tab>file_and_link 
data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3
 data/gempak/nexrad/ALLNIDS/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3

The 1st argument to the script "file_and_link" would be the pathname of the 
regular output file and the second would be the symbolic pathname.

The script, itself, would be something like this:

    cat >$1
    mkdir -p `dirname $2`
    ln -sf $1 $2

> Thanks.  I see that the â-waitâ option fixes the current coding.
> 
> How should the custom script call the pqact âactionsâ?
> Or would the script anticipate a PIPE action to dump stdin to a filename, 
> then execute the mkdir and ln commands?
> 
> eg. script: dump.n.link
> 
> set outpath="/data/gempak/nexrad/NIDS/(\1:yyyy)(\1:mm)(\1:dd)/\5/\4"
> set outfile="\4_(\1:yyyy)(\1:mm)\1_\2\3"
> set linkpath= "/data/gempak/nexrad/ALLNIDS"
> cat - > ${out path}/${oufile}
> mkdir -p ${linkpath}//\5/\4
> ln -sf ${out path}${oufile}
> 
> Then
> NEXRAD  ^SDUS[2357]. .... 
> ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N[013][QUSP])(â)
> PIPE ~util/dump.n.link

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: DIL-286118
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.