Plus propre que le grep -A 9 ou l'on n'etait pas sur d'avoir
toutes les references. darcs-hash:20050722213720-061a7-969003a71916aa21fce55cff3da739870c279284.gz
This commit is contained in:
parent
3df21f1b07
commit
6fc2b0b6d3
1 changed files with 2 additions and 4 deletions
|
@ -28,8 +28,7 @@ for forum in $(find $Rep_News -type d -mindepth 1 -printf '%P \n') ; do
|
||||||
if test -f $fichier ; then
|
if test -f $fichier ; then
|
||||||
for article in $(find $Rep_News$forum -type f -maxdepth 1 -newer $fichier -printf '%P \n') ; do
|
for article in $(find $Rep_News$forum -type f -maxdepth 1 -newer $fichier -printf '%P \n') ; do
|
||||||
mid=$(awk '/^Message-ID: / {print $2}' $Rep_News$forum/$article)
|
mid=$(awk '/^Message-ID: / {print $2}' $Rep_News$forum/$article)
|
||||||
ref=$(grep -m 1 -A 9 "References: " $Rep_News$forum/$article | \
|
ref=$(awk 'BEGIN{RS="";FS=":"} /References: / {i=1;while($i !~ /References$/) i++;print $(i+1)}' $Rep_News$forum/$article | grep "^ <" | tr -d '\n')
|
||||||
awk 'BEGIN { RS = "" ; FS = ":" } {print $2}' | grep "^ <" | tr -d '\n')
|
|
||||||
$(echo $article $mid $ref >> $id )
|
$(echo $article $mid $ref >> $id )
|
||||||
done
|
done
|
||||||
else # si le dernier message avant le dernier id-xage est annule ou modere
|
else # si le dernier message avant le dernier id-xage est annule ou modere
|
||||||
|
@ -38,8 +37,7 @@ for forum in $(find $Rep_News -type d -mindepth 1 -printf '%P \n') ; do
|
||||||
$(echo -n > $id)
|
$(echo -n > $id)
|
||||||
for article in $(find $Rep_News$forum -type f -maxdepth 1 -printf '%P \n') ; do
|
for article in $(find $Rep_News$forum -type f -maxdepth 1 -printf '%P \n') ; do
|
||||||
mid=$(awk '/^Message-ID: / {print $2}' $Rep_News$forum/$article)
|
mid=$(awk '/^Message-ID: / {print $2}' $Rep_News$forum/$article)
|
||||||
ref=$(grep -m 1 -A 9 "References: " $Rep_News$forum/$article | \
|
ref=$(awk 'BEGIN{RS="";FS=":"} /References: / {i=1;while($i !~ /References$/) i++;print $(i+1)}' $Rep_News$forum/$article | grep "^ <" | tr -d '\n')
|
||||||
awk 'BEGIN { RS = "" ; FS = ":" } {print $2}' | grep "^ <" | tr -d '\n')
|
|
||||||
$(echo $article $mid $ref >> $id )
|
$(echo $article $mid $ref >> $id )
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue