There are 100 lines in a file. How to print line number 31-50 and 81-90 in unix with a single command.

Answers were Sorted based on User's Feedback



There are 100 lines in a file. How to print line number 31-50 and 81-90 in unix with a single comman..

Answer / vc

sed -n -e '31,50p' -e '81,90p' filename.txt

Is This Answer Correct ?    0 Yes 0 No

There are 100 lines in a file. How to print line number 31-50 and 81-90 in unix with a single comman..

Answer / xx

awk '(NR>31 && NR<50) || (NR>81 && NR <90) filename.txt

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

What are the active and passive transforamtions?

2 Answers  


can any one explain me about junk dimension

4 Answers  


Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?

0 Answers  


If no. of source columns is changing every time (First time it is 10 next time it is 20 so on). How to deal with it without changing mapping?

9 Answers  


can you please explain me pre session and post session options?

3 Answers   BTBP,






How to load relational source into file target?

3 Answers   IBM,


what is degenerated dimension?

1 Answers   IBM,


I HAVE 10 records in source. I want to store i record in target 1, second record in target 2, third record in target 3, 4 th record again in target 11, 5th again in target 2, 6th again in target3 etc.... how it is possible?

5 Answers   Syntel,


how we load the data from source to staging area

4 Answers   TCS,


How do u identify or filter out a 0 byte file available in a folder by using UNIX command?

1 Answers   Wipro,


If we use sorted ports in aggregator transformation and somehow records are not in order by format so what will happen,session fails or it succeeded with incorrect data?

1 Answers   Amdocs,


h0w many versions have been developed of onformatica so far?

1 Answers   TCS, TetraSoft,


Categories