Alıntı
#!/bin/bash
KONU="SYNLER"
EMAIL="osman@ni.net.tr"
MESAJ="/tmp/synmail.log"
echo "SYN Baglantilar Listeleniyor" > $MESAJ
echo "----------------------------" >>$MESAJ
netstat -ntu |grep SYN | awk '{print $5}' | awk '{sub("::ffff:","");print}' | cut -f1 -d ':' | sort | uniq -c | sort -n | grep -v -e server -e Address -e 127.0.0.1 -e 0.0.0.0 >> $MESAJ
/bin/mail -s "$KONU" "$EMAIL" < $MESAJ

Alıntı
[root@server ~]# ./syn.sh
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
Usage: awk [POSIX or GNU style options] [--] 'program' file ...
POSIX options: GNU long options:
-f progfile --file=progfile
-F fs --field-separator=fs
-v var=val --assign=var=val
-m[fr] val
-W compat --compat
-W copyleft --copyleft
-W copyright --copyright
-W dump-variables[=file] --dump-variables[=file]
-W gen-po --gen-po
-W help --help
-W lint[=fatal] --lint[=fatal]
-W lint-old --lint-old
-W non-decimal-data --non-decimal-data
-W profile[=file] --profile[=file]
-W posix --posix
-W re-interval --re-interval
-W source=program-text --source=program-text
-W traditional --traditional
-W usage --usage
-W version --version

To report bugs, see node `Bugs' in `gawk.info', which is
section `Reporting Problems and Bugs' in the printed version.

gawk is a pattern scanning and processing language.
By default it reads standard input and writes standard output.

Examples:
gawk '{ sum += $1 }; END { print sum }' file
gawk -F: '{ print $1 }' /etc/passwd
./syn.sh: line 8: {sub("::ffff:","");print}: command not found
....