In a file , how to retrieve the lines which are the
multiples of 50 ? like 50,100,150th lines etc.

Answer Posted / mohsin

egrep "^[0-9]*[0|5]0" filename

Is This Answer Correct ?    5 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are filters explain sort with all the options available?

939


How do I run a script on mac?

570


What is a shell in operating system?

591


What is bash command used for?

585


Explain about non-login shell files?

698






What is awk in shell scripting?

556


What is the syntax of "nested if statement" in shell scripting?

633


What does $1 mean in bash?

614


What is the first line in a shell script?

557


c program to display the information of given file similar to givan by the unix or linux command ls -l

1699


Explain about the slow execution speed of shells?

779


Explain about "s" permission bit in a file?

617


Is shell and terminal the same?

593


What is the best scripting language?

568


Why do we write bin bash in shell scripts?

546