issue with pattern matching

view full story

http://www.unix.com – i have 2 strings with values below which are read from a file 1 ---> end 2 ---> string(1)newline="\n"; which need to be compared inside an if block as below Code: if [ ${LAST_1_LINE} == "end" -a ${LAST_2_LINE} == "string\(\1\)newline\=\"\\n\"\;" ] then   echo "pattern match" fi but the above code is not working (HowTos)