#! /bin/sh explic () { echo "Utilisation : $0 PID_OctavE mots_cles !" >&2 exit 1 } [ $# != 2 ] && explic liste=`grep 'OctavE\['$1'\].*'$2 /var/log/user.log|grep -v ' ERR: '|grep ': Re[pq]\. '|cut -d' ' -f7|sort|uniq` p="" for v in $liste do p=$p"|"$v done p2=`echo $p|sed 's/|//'` # echo '('$p2')' grep 'OctavE\['$1'\]' /var/log/user.log|egrep '('$p2')'|cut -d' ' -f1-3,6-