awk command examples :
Awk is an text processing language which will typically use for extracting the required data from the flat file. You can define your requirements by using the conditions in the awk programming.
This is widely used product in most of the UNIX like operating systems.
To explain this I have given list of awk command examples.
Create the following file – students- using your favourite editor:
Manmohan 286 555-5574 manmohan 8 Atul 280 555-4221 atul 10 Anshul 279 555-1112 anshul 2 Romel 284 555-2121 shrikant 12
Now let us take awk command examples one by one.
1. awk command examples for printing only names of all the students
[root@kalwa1 tmp]# gawk '{print $1}' students Manmohan Atul Anshul Romel [root@kalwa1 tmp]#
Leave a Reply