I have 2 file, a.txt
and b.txt
and I want to compare them.
a.txt
contains:
abc
jkl < jkl
mno > mno
pqr <> pqr
b.txt
contains:
abc
jkl < jkl
mno > mno
pqr <> pqrs
stu
I'm using this script:
$ diff a.txt b.txt | grep "> " | cut -c3- > c.txt
Which results in c.txt
:
pqr <> pqr
pqr <> pqrs
stu
Why is pqr <> pqr
being included in the results? How can I resolve this?
grep '^> '
. That is, look for>
only at the start of the line. What has ssh to do with this?