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

Is it inbetween or in between?

1018


What is the pipe command?

1145


Enlist some filename manipulation commands in unix.

1116


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

1181


What is ‘ps’ command for?

1154


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

1175


What is the comma to display different lines that are found when compare two files?

1117


Is grep faster than awk?

1007


What is used to type command?

1026


What are the dos commands?

1220


What are file commands?

1193


How to find $ai_serual resolved path by using unix

1676


How do I find previous commands in unix?

1145


What is the use of cut command in unix?

1320


What are reported commands?

1092