根据进程启动时间进行kill

#!/bin/bash
PIDNU=`pgrep -f vi |wc -l`
while [ $PIDNU > "0" ]
PID=`pgrep -o vi`
do
kill -9 $PID
done