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

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

1697


Write the syntax for "if" conditionals in linux?

595


What is the purpose of scripting?

581


What is the difference between scripting and coding?

541


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






Where are cowrie shells found?

578


Why is shell scripting important?

576


What does $1 mean in bash?

614


What is shell company all about?

575


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2230


What does path stand for?

640


What is the meaning of $1 in shell script?

592


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

662


How do I open a jshell in cmd?

598


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

701