Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / abhishek

awk 'NR % 2 == 0 {print}' abc.txt

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a powershell script?

1041


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2421


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

929


What is the difference between bash and shell?

1058


Explain about shebang?

984


What does $$ mean in shell script?

989


What is inside a seashell?

1066


What are the different commands available to check the disk usage?

916


How to print all array elements and their respective indexes?

898


How to print the first array element?

978


Explain about login shell?

1051


How will you emulate wc –l using awk?

1459


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?

1063


Which is better perl or shell scripting?

941


What are the zombie processes?

913