system("ps |grep boa|grep -v grep|cut -c 1-6|xargs kill -9");
grep -v 表示 Select non-matching lines, 因为grep的时候把它本身的进程也抓出来了。
cut -c 1-6 表示 只保留第一到第六个字符,这里把进程号cut来了。
xargs - build and execute command lines from standard input.捕获一个命令的输出,然后传递给另外一个命令
grep -v 表示 Select non-matching lines, 因为grep的时候把它本身的进程也抓出来了。
cut -c 1-6 表示 只保留第一到第六个字符,这里把进程号cut来了。
xargs - build and execute command lines from standard input.捕获一个命令的输出,然后传递给另外一个命令