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

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?

619


How do I run a .sh file on mac?

656


How many fields are present in a crontab file and what does each field specify?

561


What is the best scripting language?

544


What does $0 mean in shell script?

538






Can shell script run on windows?

547


How will you print the login names of all users on a system?

554


Write down the syntax for all the loops in shell scripting.

638


Why is a script important?

544


What is wc in shell script?

544


How will you find the 99th line of a file using only tail and head command?

1950


What is the fastest scripting language?

537


What is a beat in a script?

523


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1688


How do we delete all blank lines in a file?

559