👤
Home Man
Search
Today's Posts
Register


Extract common data out of multiple files

UNIX for Dummies Questions & Answers




Kindly Note - This is a Single User Post by Forum Member mukulverma2408 Regarding:
Extract common data out of multiple files.
Please Follow The Primary Link Above to View the Full Discussion.

Old 12-30-2012
Hi sathyaonnuix,
Consider the below scenario :
Code:
cat filea
line1
line2
repeat1
line3
repeat2
line4
repeat1

Code:
cat fileb
1234567
repeat1
repeat2
bbbbbb

Code:
cat filec
line1
repeat1
repeat2
line2
repeat1
line3

Now executing the script for these three files would result in below output
Code:
repeat1
repeat2
repeat1

repetition of repeat1 which i think was not required

P.S. I am running while loop on filea