When this script is executed I get the PID. Now I want to read the output "PID" and run the next command in this way:
ps -ef | grep -i PID
ps -ef | grep -i PID
while read -r -u10 server port line
do
echo ========== server: "$server" port: "$port" ==========
ssh -qn "$server" "netstat -tulpunt | grep -E ":$port "" | \
awk '{print $7}' | grep '/' | awk -F "/" '{print $1}'
echo
done 10< demo
Aucun commentaire:
Enregistrer un commentaire