Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to get the last ten lines of a file using awk utility?

Answer Posted / ajay

awk '{x[NR]=$0} END{for (i=NR-10;i<=NR;i++) print x[i]}'

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to use grep command to list find the records of a file containing 10 different strings?

1065


Explain ‘system calls’ with respect to unix commands?

1091


What does touch command do in unix?

1417


Is grep faster than awk?

1039


What is the first character of the output in ls l command?

1209


Explain mount and unmount command.

1210


What are the general commands in using unix os for a beginner?

1164


Which command is used to create a directory?

1160


What is grep short for?

1045


Write a command to kill the last background job?

1098


What happens when we execute a unix command?

1134


How do you grep a case insensitive?

1044


What are the unix commands?

1091


What is the use of finger command?

1207


What is unix command?

1253