How to Skip 1st line of file - awk
<p>I am beginner to awk.
I have created one file which contains employee information.
There are employees in different departments. And i wanna count that how many employees in each department.
like</p>

<pre><code>marketing        3
sales            3
production       4
</code></pre>

<p>For that i used following command.</p>

<pre><code>awk 'NR&gt;1 {dept=$5} {count[dept]++} END {for (dept in count) {print dept count[dept]}}' emp
</code></pre>

<p>But above code it count and displays the first line i.e header also.
like</p>

<pre><code>marketing 3
sales 3
department 1
production 4
</code></pre>

<p>where department is a header of column which is also counted although i used NR>1..
And how to add space or increase the width of all columns.. because it looks like above output.. but i wanna  display it properly..
So any solution for this?</p>

<p>Here is my input file</p>

<pre><code>empid       empname     department
101         ayush    sales
102         nidhi    marketing
103         priyanka    production  
104         shyam    sales
105         ami    marketing
106         priti    marketing
107         atuul    sales
108         richa    production
109         laxman    production
110         ram     production
</code></pre>