hi I want to get the output only for 2nd field is "partition", can somebody point out what I did wrong? thanks.
[root@box1 tmp]# /sbin/swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 16779884 0 -1
/addswap file 20482943 0 -2
I did
/sbin/swapon -s | awk '/$2=="partition"/ {print $3}'
but no output.
Regards!
[root@box1 tmp]# /sbin/swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 16779884 0 -1
/addswap file 20482943 0 -2
I did
/sbin/swapon -s | awk '/$2=="partition"/ {print $3}'
but no output.
Regards!