On Thu, Aug 11, 2016 at 04:34:28PM +0200, Paolo Supino wrote:
> Hi Chet
>
> thank you for the reply, I tried [ "$string" = 'commit;' ] but it didn't
> work :-( and I don't think that case cuts it for my problem.
You probably have whitespace or other garbage in your string.
Find out what's in it, either by running that section of the script
with 'set -x' enabled, or by doing "declare -p string" before the
check, or by doing something like printf %s "$string" | hexdump.
If the string is coming from a file that has ever been touched by a
Windows machine, then carriage return is a very probable candidate for
your unwanted garbage character.