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

Answer Posted / ganeswar bojanapu

Here is simply command

sed -n '50~50'p filename

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I read a .sh file?

524


How will you copy a file from one machine to other?

538


How do I open the shell prompt?

565


I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.

588


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.

1703






What is the meaning of $1 in shell script?

583


How does shell scripting work?

605


How do I run a .sh file?

606


How to print all the arguments provided to the script?

544


What are the 3 standard streams in linux?

567


What does $0 mean in shell script?

549


How do you find out What is your shell?

580


What happens when you type ls?

553


What does the sh command do?

598


What is echo in shell?

628