could you please help with awk or any other method..
Inputfile contains below..
PROD 192.168.100.25 Unix Active
PROD 192.168.100.26 Unix - Server Active
DEV 192.168.100.27 windows Gateway Active
TEST 192.168.100.28 Unix Test Server Not Active
PROD 192.168.100.29 windows mail gateway Active down
PROD 192.168.100.30 Unix Active down
Now try awk to get column 2 and 4, see below
awk '{print $2 $4}' Inputfile
result-
192.168.100.25 Active
192.168.100.26 -
192.168.100.27 Gateway
192.168.100.28 Test
192.168.100.29 mail
192.168.100.30 Active
expected result-
192.168.100.25 Active
192.168.100.26 Active
192.168.100.27 Active
192.168.100.28 Not Active
192.168.100.29 Active down
192.168.100.30 Active down
,as delimiter, i.e. the lines should look like this:PROD,192.168.100.29,windows mail gateway,Active downcat -A fileNameHere. Also treatment you can use@followed by name to ping someone, like @anukalps