Just trying to compare the following variables as a condition in an 'if' statement.
ZERODATA="unidentified 0 b (0%)"
DATA=`sed -n "${dln} p" mpck2.out`
...
if [ "$DATA" != "$ZERODATA" ]
then
...
The problem I'm getting is that the condition always comes out true and doesn't appear to compare them properly. If I use the 'ne' operator I get an error.
(All I actually want to know is if the string DATA contains the substring '0 b (0%)' and use that in the 'if' statement but I just want to get the match for now to simplify the problem.)
Is anyone able to tell me why these would not compare correctly?