Issue
I have a file with IDS
cat id.csv
154,art
155,art.br
and another with with TLDs
cat tld.csv
art
abc
while read -r tld
do
cat id.csv | grep -w "$tld" >> final.csv
done < tld.csv
it catch the art.br
as well
I tried
grep -E "^$tld$"
and
grep -Fx $tld
both give blank result
I only want art
to be out as result
Solution
cat id.csv | grep -E ",$tld$" >> final.csv
Answered By - Amit Singh Answer Checked By - Clifford M. (WPSolving Volunteer)