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 to make a new directory?
What are the differences among a system call, a library function, and a unix command?
Which command will print your home directory on screen?
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
Explain command to view process running?
How do I open a port?
Does cp command overwrite files?
Who wrote grep?
What is pipe command in unix?
Why is awk called awk?
How do you repeat a command in terminal?
What does this command do? Cat food 1 > kitty
What does #!/ Bin sh do?
What is grep command in unix with examples?
Explain ‘library functions’ with respect to unix commands?