shell-结束所有的ffmpeg进程

#!/bin/bash

ps_id=`ps -ef | grep -w ffmpeg | grep -v 'grep'| awk '{print $2}'`
if [[ "$ps_id" != "" ]];then
 echo $ps_id
 echo '-------------------------------- memstat --------------------------------'
 kill $ps_id
fi

你可能感兴趣的:(shell,linux)