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

following scenario empsal table i want who exist one lakshs sal above monthwise? ` empsal empid monthyear sal 1 jan2008 1000 2 march2009 50000 3 april2009 4000 4 feb2009 100000 5 jul2009 600000 6 dec 2008 90000

5 Answers   Wipro,


How to enter same record twice in the target table,explain?

7 Answers  


Can you create a flatfile target

3 Answers   ABC,


How can we delete duplicate rows from flat files?

0 Answers  


How to start a workflow using pmcmd command?

0 Answers  






Source table ------------- ID NAME --- ------ 101 PANKAJ NULL KUMAR NULL MATHUR 102 JYOTI NULL SAXENA 103 SACHIN NULL TENDULKAR TARGET TABLE ------------- ID NAME --- ------- 101 PANKAJ KUMAR MATHUR 102 JYOTI SAXENA 103 SACHIN TENDULKAR How to do the above scenario in Informatica.

4 Answers   Cap Gemini,


How to Migrate the UNIX SCRIPTS from SIT TO PROD?

1 Answers  


What are the types of maping wizards that r to be provided in Informatica?

2 Answers  


How can one identify whether mapping is correct or not without connecting session?

0 Answers  


what is the dashbords?

1 Answers   IBM,


how many data models u have done in informatica project?

2 Answers   TCS,


I have a flat file, in which i have two fields, emp_id, emp_name. The data is like this, emp_id,emp_name 101,soha 101,ali 101,khan 102,siva 102,shanker 102,reddy. how to merge the names so that my output is like this Emp_id Emp_name 101 Soha ali kahn 102 siva shenkar reddy please provide solution

5 Answers  


Categories