check_results=`ps -ef|grep bp_driver.launch|awk '{print $2}'|sed -n 1p`
echo `kill -2 $check_results`

 

运行上面的命令后,杀掉下方19158进程

higgs    19158 17223  1 04:00 pts/17   00:00:01 /usr/bin/python /opt/ros/indigo/bin/roslaunch blackpearl bp_driver.launch
higgs    20439 19866  0 04:02 pts/18   00:00:00 grep --color=auto bp_driver

  

相关文章:

  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2021-06-18
猜你喜欢
  • 2021-12-21
  • 2021-12-21
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案