My scrapbook about anything which I learned or want to remember, Sometime about tech tips, thoughts and rambling. If you find anything useful don't forget to give thumbs-up :)

Breaking

Friday, September 11, 2015

Linux Shell Script Scenario #3




Design a Shell Script which have to work for below scenario :-


We are having two files, File1 is having a 20,000 lines of data and File2 is having few lines, Now the requirement is - Read the File2 and remove the line from File1 which is having those word.

Suppose -  

File1 ---
TCS, Tata Consultancy Services
IBM, International Business Machine
TD, Teradata
IM, Information Management
WM, WareHouse Management
WC, Work Center


File2
IBM
WM
TCS


Output :
TD, Teradata
IM, Information Management
WC, Work Center


For more scenario -  CLICK HERE


No comments:

Post a Comment

Disclaimer

The postings on this site are my own and don't necessarily represent IBM's or other companies positions, strategies or opinions. All content provided on this blog is for informational purposes and knowledge sharing only.
The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of his information.