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
Which unix command lists files/folders in alphabetical order?
What does #!/ Bin sh do?
What is the use of the command 'ls -x chapter[1-5]' ?
What is the comma to display different lines that are found when compare two files?
What is the general format of unix command syntax?
How to display no of records in oracle using unix command?
What's a command word?
What is the use of finger command?
Using unix command how to display no of records in oracle?
What does the “echo” command do?
Differentiate cat command from more command.
Which command should you use to find the remaining disk space in unix server?
Which command is used to copy files?
How do I use grep to find a file?
Which command is used to create a directory?