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


Please Help Members By Posting Answers For Below Questions

Is bash a shell script?

591


What is the use of echo in shell script?

533


Explain about login shell?

627


How to pass an argument to a script?

585


what is info area how many types?

2279






What is bash shell command?

555


What is eval in shell script?

643


What is the use of break command?

577


How do I run a shell script on a mac?

620


Which shell is the best?

566


Which scripting language is best for automation?

526


How do I set bash as default shell mac?

549


How do I run a shell script in powershell?

547


Explain about gui scripting?

617


What are the different commands available to check the disk usage?

483