Blog Archives

AWK Tutorial – Day 3

In this session, we will see few examples to understand the features discussed in the session 2. # ExIf.awk BEGIN { proto = 0 } { if ( $1 !~ /^#/ && $ !~ /^$/ ) { proto++ } } END { print “Total Number Protocols: ” proto } RUN: $ awk -f ExIf.awk /e…

Tagged with:
Posted in Uncategorized

AWK Tutorial – Day 2

In previous session, we saw few AWK one-line examples, which can help us to do some simple tasks. In this session, we will try to understand the structure of an AWK Program and the features available in language.Structure of the simple AWK Program…

Tagged with:
Posted in Uncategorized

AWK Tutorial – Day 1

UNIX world is having a wonderful list of powerful scripting languages. In this series, we are going to learn the basics of the good old AWK Programming Language. Unlike Perl and Python, it is not very familiar among the many new users, thats why I…

Tagged with:
Posted in Uncategorized

Print Redirection in AWK

Yesterday I made a mistake in AWK script, which I wrote to analysis the output of a TDMA-TDD simulation. In AWK script, I was trying to copy few specific lines to some other files like this: print $0 > file.txt When I run it, I got the following e…

Tagged with: ,
Posted in Uncategorized