enregistrement="" lastdate="$(</tmp/dateULOG.mysql)" affich() { while read enregistrement; do if [ ! "$enregistrement" ]; then echo "aucune entrée" else sed 's/\([^ ]*\).*/\1/'<<< "$enregistrement" > /tmp/dateULOG echo "$enregistrement" fi done } mysql -h "$my_server" -D "$my_DB" -u "$myUser" -p "$my_pwd" <<EOF | affich select timestamp, oob_in, oob_out, udp_sport, tcp_sport, inet_ntoa(ip_saddr), inet_ntoa(ip_daddr), tcp_dport, udp_dport, tcp_ack from ulog where timestamp > "$lastdate" order by id; EOF