I'm trying to compare two strings, which are identical as I can see in the log of debugging the next lines:
echo "line: $line"
echo "fingerPrints:$i ${fingerPrints[$i]}"
31 + echo 'line: DCD0 5B71 EAB9 4199 527F 44AC DB6B 8C1F 96D8 BF6D'
32 + echo 'fingerPrints:1 DCD0 5B71 EAB9 4199 527F 44AC DB6B 8C1F 96D8 BF6D'
But when I try a line after to compare those strings,
if ["$line" ne "${fingerPrints[$i]}"]; then
this is what's happening:
33 + '[DCD0 5B71 EAB9 4199 527F 44AC DB6B 8C1F 96D8 BF6D' ne
'DCD0 5B71 EAB9 4199 527F 44AC DB6B 8C1F 96D8 BF6D]' ./gentoo-stage.sh:
line 33: [DCD0 5B71 EAB9 4199 527F 44AC DB6B 8C1F 96D8 BF6D: command not found
I am not trying to check if one string contains the other, just if they are euqal.
Same results when I try !=
instead of ne
.