how to compare two lines using shell script?

how to compare two lines using shell script?


#!/bin/bash

line1="hello1"
line2="hello1"

if [ "$line1" = "$line2" ]
then
echo match

else

echo not a match

fi