I have a variable with a list of values that I would like to loop through & print value with a comment
<p>Using #!/bin/bash</p>

<pre><code>variable
----------
abc123
abc1245
abc2390
</code></pre>

<p>I would like to do the following:</p>

<pre><code>for r in "$variable" ; do
 if [ [ "$variable" != ""] ] ; then
     echo "$r OK"
   continue
 fi
done 
</code></pre>

<p>I would like to output the value (i.e. each line) with a comment, "OK" as shown below</p>

<pre><code>abc123 OK
abc1245 OK
abc2390 OK
</code></pre>

<p>however, the script above outputs this</p>

<pre><code>abc123
abc1245
abc2390 OK
</code></pre>

<p>Thoughts?</p>