I need to compare two files and display the difference in table format using shell script. for example.
file1.txt
ap-2.21.3.rpm
bp-3.42.4.rpm
cp-devel-3.23.2.rpm
ep-devel- 2.23.2-23.rpm
file2.txt
ap-2.21.3.rpm
bp-3.43.4.rpm
cp-devel-4.33.2.rpm
dp-4.52.4.rpm
output will be in:
Name | file1 | file2
-------------------------------+---------------------------+---------------------------
bp | 3.42.4 | 3.43.4
cp-devel | 3.23.2 | 4.33.2
dp | | 4.52.4
ep-devel | 2.23.2-23 |
.rpm
. Consist the version number always of three blocks of numbers?diff
. This is more like comparing data in database from two different tables. Certainly doable in shell, but maybe that's not the right way to do it?ap-dev.2.35.foo-bar.3.rpm
?