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 |
What is awk used for?
What are awk commands?
what are the different hardwares available?
what is the command to list files in a directory in UNIX?
Write a command to display a file’s contents in various formats?
Explain command to display different lines that are found when compare two files?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.
How to delete a directory containing files and folders?
When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?
Describe the zip/unzip command using gzip.
How to get the operating system's information in unix?
What are file permissions in Unix, and how are they represented?