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?



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

Answer / 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

More Unix Commands Interview Questions

What is the use of the command 'ls -x chapter[1-5]' ?

0 Answers  


What is command substitution?

0 Answers  


Explain ‘system calls’ with respect to unix commands?

0 Answers  


Briefly, how do you install Oracle software on UNIX.

2 Answers  


What is the difference between AWK and SED commands? Plz give example and explain...

3 Answers   RBS,


What is the procedure of "at" and crontab" commands?

4 Answers  


Which command should you use to find the remaining disk space in unix server?

0 Answers  


which command is used to identify the type of the file?

3 Answers  


What does mkdir up2date; touch outdated up2date do?

2 Answers  


How to display no of records in oracle using unix command?

0 Answers  


What is the difference between cat and more command?

0 Answers  


Where LOG fiels resides in AIX and pls tel me how to remove the log file

6 Answers   Vestas,


Categories