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

Answer Posted / vivek

egrep "^[0-9]*[05]0$" filename

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

617


What makes c shell a more preferable option than the bourne shell?

530


What lives in a shell?

528


How to open a read-only file in the shell?

632


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?

631






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..

1779


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

662


State the advantages of shell scripting?

588


What are different types of shell?

480


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2098


What is a scripting language simple definition?

543


How will you pass and access arguments to a script in linux?

571


How do I run a .sh file on mac?

665


What are zombie processes?

562


write a shell script to check the failed jobs?

3946