I am having a problem with the parsing and comparison of data as follows.
thinningCriteria="$(cat thinningCriteria$j.k)"
minThickElement="$(cat minimumThickness$j.k)";
d= "$(cat BHF$j.k)";
echo $d
echo $minThickElement
echo $thinningCriteria
for d it gives errror as follows, so this is the first problem.
N o r m a l t e r m i n a t i o n
./dynaOffenRigid.sh: line 137: 1000: command not found
where
d= "$(cat BHF$j.k)"; is on line 137 and the file has a value of 1000
secondly I have to compare two values like below
if (( $minThickElement -lt $thinningCriteria ))
then
fi
in this case the error is as follows.
999979
986667
./dynaOffenRigid.sh: line 147: ((: -lt 986667 : syntax error in expression (error token is "986667 ")
the only value in BHF$j.k is 1000
the only value in thinningCriteria$j.k is 999979
the only value in minimumThickness$j.k is 986667
I dont know what am I doing wrong when I am comparing, and why there is are error for my shell.
please all tell me the usage of while loop I used
while [ $minThickElement -gt $thinningCriteria ] but same error.
I expect some suggestions from experts. As I cant find the solution.
best regards
problem 1:
change
to
problem 2:
try