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

write a query following source region sales 1 1000 2 2000 i want the output ?please give solution 1 2 1000 2000

8 Answers   TCS,


In Joiner Transformation, how to identify the master and detail tables if one is from Oracle and the other is from Sybase.

2 Answers   TCS,


what are the differences between powercenter 8.1 and powercenter 8.5?

2 Answers  


Differentiate between source qualifier and filter transformation?

0 Answers  


What is the "File Repository" and how can we use that in the Informatica ? Please give one example of the Process ? waiting for Reply... Thank you .

4 Answers  






following table source name gender a1 male a2 female how to change 'male' to 'female' and 'female' to 'male'

2 Answers  


suppose i have 1000 records and i want to load half of the record in target 1 and half in target2.how u'll do?

9 Answers   IBM,


what is left outer join?

3 Answers   L&T,


without matching columns in two tables. how can you join

5 Answers   BirlaSoft,


Source is a flat file and want to load unique and duplicate records separately into two separate targets; right??

4 Answers  


In aggregator if u enable sorted input what will be the output and disable sorted wt is output

6 Answers  


Define enterprise data warehousing?

0 Answers  


Categories