Based on the following:
Quote:
|
$RANDOM is an internal Bash function (not a constant) that returns a pseudorandom [1] integer in the range 0 - 32767.
|
Yes to eventually being equal at least after this maximum is reached.
As to:
Quote:
|
Is there anything wrong (syntactically and/or logically) with the script?
|
1. Zero indenting which makes it quite difficult to read
2. C is an integer and not a string so quoting would not seem appropriate although it of course causes no error
3. (()) is used by bash for numeric comparisons and arithmetic so the following changes could be made:
Code:
if [ $A -eq $B ]; then
if (( A == B )); then
let C++
((C++))
4. Personally I am not fond of infinite loops so I would probably have an actual test in the while loop.