diff --git a/news-cancel b/news-cancel index 72823ed8..129378f5 100755 --- a/news-cancel +++ b/news-cancel @@ -21,9 +21,9 @@ if [[ "${ORIG_LOGNAME-$SUDO_USER}" = "" ]] fi groupe=adm -tempF=$(tempfile -d /tmp -p "news-cancel") -tempF2=$(tempfile -d /tmp -p "news-cancel-commentaire") -tempF3=$(tempfile -d /tmp -p "news-cancel-message") +tempF=$(tempfile -d /tmp -p "newscancel") +tempF2=$(tempfile -d /tmp -p "newscancelcommentaire") +tempF3=$(tempfile -d /tmp -p "newscancelmessage") VERIF () { ligne=`grep --binary-files=text " $1 " /var/spool/news/overview/OV1 | head -n 1 | awk -F "\t" '{print $1"~"$2"~"$3"~"$9}'` @@ -31,7 +31,7 @@ VERIF () { titre=`echo $ligne | awk -F "~" '{print $2}'` newsgroup=`echo $ligne | awk -F "~" '{print $4}' | awk '{print $3}' | awk -F : '{print $1}'` #numero=`echo $ligne | awk -F "~" '{print $1}'` - numero=`echo $ligne | awk -F "~" '{print $4}' |awk -v VAR1=$newsgroup 'BEGIN {RS = " "} ; $0 ~ VAR1 {print $1}' | awk -F ":" '{print $2}'` + numero=`echo $ligne | awk -F "~" '{print $4}' |awk -v VAR1=$newsgroup 'BEGIN {RS = " "} ; $0 ~ VAR1 {print $1}' | awk -F ":" '{print strtonum($2)}'` echo "il s'agit du message $titre, numéro $numero, posté par $auteur dans $newsgroup" echo "" echo -n "exact ? [o/n] "