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 is shell company all about?

575


shell script for reverse the string

918


What are filters explain sort with all the options available?

932


Write a shell script to get current date, time, user name and current working directory.

636


How are shells born?

557






What is shell and shell script?

556


How do you know which shell I am using?

587


What is the syntax of while loop in shell scripting?

569


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1791


How to get the last line from a file using just the terminal?

671


Is shell and terminal the same?

593


What does $$ mean in shell script?

584


Tell something about the super block in shell scripting?

571


What is the equivalent of a file shortcut that we have a window on a linux system?

604


What does egrep mean?

573