How can I extract the substring after a /
and compare the extracted value against another file ?
cat file
/abc|98357|
abc/aabb|023947|
xyz/0102|293847|
pqr/pqrst|29384|
9864/truse|253123|
expected output :-
abc|98357|
aabb|023947|
0102|293847|
pqrst|29384|
truse|253123|
And then compare col 1 of file 1 with another file :-
aabb
pqrst
truse