Linux commands
From Krm
(Difference between revisions)
Line 11: | Line 11: | ||
Sum the numbers in a column | Sum the numbers in a column | ||
− | + | awk '{ SUM += $1} END { print SUM }' | |
+ | |||
+ | Get substring of a column | ||
+ | awk '{print $1" " substr($2)}' |
Latest revision as of 17:24, 20 December 2010
[edit] tcpdump
CDP packets
'ether[20:2] == 0x2000'
PPPoE discovery, session packets
pppoed pppoes
[edit] awk
Sum the numbers in a column
awk '{ SUM += $1} END { print SUM }'
Get substring of a column
awk '{print $1" " substr($2)}'