Need help on grep command
Hi all,
For example, i have two similar line "net.ipv4.tcp_syncookies = 1" and "net.ipv4.tcp_syncookies =1". The difference is just that one of them have space between the "=" and "1", and the other one does not have.
Then i used, the command " grep -v "^#" /etc/sysctl.conf | grep -w net.ipv4.tcp_syncookies | awk -F= '{print $2}' ". The results i get will be " 1" and "1" for the two lines respectively.
So, does anyone have any idea on how can i get the result "1" for both lines, using the same command.
Thanks
|