I have several files in a specific directory. A specific string in one file can occur in another files. If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example:
file1 ShortName "Blue Jeans" price 89.47 cur EURO file2 ShortName "Blue Jeans" Price 59.47 CUR USD file3 ShortName "Blue Jeans" Price 99.47 CUR GBP
Since the value of ShortName "Blue Jeans" is occuring in file2 & file3. Both this file should be deleted. Similarly files with other ShortName Could any one please help me how can it done via script (ksh, SED, AWK). I am on solaris.
Thank you