shell获取awk多个变量

shell获取awk的多个变量

#!/bin/sh

ps -ef | grep tomcat | grep BTGCP | awk '{print $2,$9}' | while read var1 var2; do
    echo $var1" "$var2
    ss -nltp | grep $var1
done

You may also like...

发表评论