Mass killing operation saves time. Do it in MySql itself:
Run these commands
mysql> select concat('KILL ',id,';') from information_schema.processlist
where user='root' and time > 200 into outfile '/tmp/a.txt';
mysql> source /tmp/a.txt;
Reference
---------edit------------
if you do not want to store in file, store in a variable
Just run in your command prompt
> out1=$(mysql -B test -uroot -proot --disable-column-names -e "select concat('KILL ',id,';') from information_schema.processlist where user='root' and time > 200;")
> out2= $(mysql -B test -uroot -proot --disable-column-names -e "$out1")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…