unix - Converting non-redundant data to redundant data in files with different names -
I have two set files .TTT and .MMM and there are many versions of this file name and their content as follows: -
filenameXYZ_v1.0.txt apple filename XYZ_v2.0.txt apple filename XYZ_v3.0.txt orange filename XYZ_v4.0.txt orange
.. ...............................
filenameXYZ_v1 .0.xml "Data v1. 0 and v2.0 "filenameXYZ_v2.0.xml" junk "filenameXYZ_v3.0.xml" data v3.0 and v4.0 "filenameXYZ_v4.0.xml" junk "
XML files Data is non-redundant, i.e. if its related If the .txt files have the same content then the real "data" will only be filled in another .xml file, the other version will be filled with "junk." I want to make the XML file unnecessary: -
filenameXYZ_v1 Data of ".0.xml" v1.0 and v2.0 "filenameXYZ_v2.0.xml" v1.0 and v2 Data .0 "filenameXYZ_v3.0.xml" v3.0 and v4.0 data "filenameXYZ_v4.0 .xml "Data of v3.0 and v4.0"
filenameXYZ_v For file in? Do the .0.txt if ["$ prefile"] & amp; Amp; Cmp -s $ file $ prefile then cp `basename $ prefile txt`xml` basename $ file txt`xmlfilefile = $ file done
Comments
Post a Comment