[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[LDM #DIL-286118]: pqact EXEC for creating sym links
- Subject: [LDM #DIL-286118]: pqact EXEC for creating sym links
- Date: Tue, 26 Jan 2016 14:58:32 -0700
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