more awk examples
As i already mentioned, awk is great. More examples in this post.
Print every n’th line (n=15):
seq 1 100 | awk 'NR%15==0 {print $0}'
Print only n’th line (n = 10):
seq 1 100 | awk 'NR==10 {print $0}'
Print average value:
seq 1 10 | awk '{sum+=$1} END {print sum/NR}'
Feel free to try this at ~
Technorati Tags: awk, linux, cli, programming

