#!/bin/bash pid=`ps aux |grep DatangEnosData-0.0.1-SNAPSHOT.jar |grep -v 'grep' |awk -F' ' '{print $2}' | xargs kill -9` echo $pid