Saturday, January 4, 2020

Checkpoint Unix - Commands




gwk

gawk -F: '{ print $1, $2, $3 }' /etc/passwd

gawk '{ sum += $1 }; END { print sum }' file


How to Print Static-Routes netstat -nr | grep -v D
netstat -rn |grep eth1 | awk -F' ' ' {print $1, $2, $3}' | sort >routes.txt
netstat -rn |grep eth1 | awk -F' ' ' {print $1, $2, $3}' | sort | wc -l

Unload Local Firewall Policy fwunload local