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

Which unix command lists files/folders in alphabetical order?

1846


What does #!/ Bin sh do?

1114


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

1268


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

1241


What is the general format of unix command syntax?

2026


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

1224


What's a command word?

1246


What is the use of finger command?

1267


Using unix command how to display no of records in oracle?

1207


What does the “echo” command do?

1192


Differentiate cat command from more command.

1201


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

1346


Which command is used to copy files?

1246


How do I use grep to find a file?

1161


Which command is used to create a directory?

1223