In a file , how to retrieve the lines which are the
multiples of 50 ? like 50,100,150th lines etc.
Answer Posted / abhishek
awk 'NR % 2 == 0 {print}' abc.txt
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
How do I run a powershell script?
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
Determine the output of the following command: name=shubham && echo ‘my name is $name’.
What is the difference between bash and shell?
Explain about shebang?
What does $$ mean in shell script?
What is inside a seashell?
What are the different commands available to check the disk usage?
How to print all array elements and their respective indexes?
How to print the first array element?
Explain about login shell?
How will you emulate wc –l using awk?
In my bash shell I want my prompt to be of format '$"present working directory":"hostname"> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?
Which is better perl or shell scripting?
What are the zombie processes?