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

how to change a normal file into hidden file

3 Answers  


What do know about tee command?

0 Answers  


What is the difference between cat and more command?

0 Answers  


Give command that will make the file "run.sh" executable?

10 Answers   IBM,


What is the use of pipes?

4 Answers  


How do you list the files in an UNIX directory while also showing hidden files?

6 Answers  


Can you enlist some commonly used network commands?

0 Answers  


How do you change file permissions and ownership in Unix?

2 Answers  


Which command is used to find whether the system is 32 bit or 64 bit?

0 Answers  


What is grep r?

0 Answers  


How to copy multiple files and directories into some other directory?

4 Answers  


write grep commands to select the lines that have exactly two characters

8 Answers   PSI Data Systems,


Categories