Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Linux command assignment variable problem
Linux command assignment variable problem
For what? Me? Are you online? "Cat? ip.txt `? ; ? do

Song Seung Heon? aaa @ `echo? $i? |? awk? -F,? {Print? $2}'`? “netstat? Arnold? |? awk? {Print? \$4}'? |? grep? 0.0.0.0:`echo? $i? |? awk? -F,? {Print? $4}'`"

finished

# You can make it more readable.

For what? Me? Are you online? "Cat? ip.txt `? ; ? do

serverinfo=`echo? $i? |? awk? -F,? {Print? $2}'`

portinfor=`echo? $i? |? awk? -F,? {Print? $4}'`

Result =`ssh? aaa@$serverinfo? “netstat? Arnold? |? awk? {Print? \$4}'? |? grep? 0 . 0 . 0 . 0:$ portinfo " ` 0

Echo? $ result

finished

# For reference only. Not tested.