I've tried to compare two strings in an if statement using unix shell in FreeBSD (/bin/sh) and is not working. I think the problem appear for lenghty strings.
What could be wrong with that:
In this example the script never enter the if statement even testFileLine var have the same value as right string.
What could be wrong with that:
Code:
if [ "$testFileLine" = "ASCII C++ program text, with CRLF line terminators" ] ; then
echo $testFileLine
fi
In this example the script never enter the if statement even testFileLine var have the same value as right string.