perl - Finding number of insertions,deletions, and changes between two files unix -
assuming have 2 text files first-
apple orange pineapple banana watermelon
the second-
apple grape orange juice pineapple watermelon
so see grape has been added, banana has been removed, , orange has been changed orange juice. main result want 1 change has occurred because orange has been changed orange juice.
any appreciated.
just use diff command.
$ diff f1 f2 2c2,3 < orange --- > grape > orange juice 4d4 < banana
Comments
Post a Comment