Bash: Compare each line in for loop
<p>I have a shell script that needs to analyze data from a file which looks like the following:</p>

<pre><code>255  48  48             exp1
97  97  97              exas
238  44  44             dkopkw
194 194 194             sdkaok
</code></pre>

<p>I then take the data and sort it in a <code>for</code> statement. For each line I need to compare the data and see if it is less than <em>90</em> and prints a line between the numbers.</p>

<pre><code>  #!/bin/bash

  for line in "$(sort /myfile.txt -k1 -n)"
  do

    COL_ONE=$(print "line" | awk '{print $1}')

    if [[ $COL_ONE -lt 90 ]]; then
            echo "$line"
            echo "------------------"
    else 
            echo "$line"
    fi

done
</code></pre>

<p>However, when this runs it does <em>not</em> print the line between the numbers. I want my output to look like the following:</p>

<pre><code>97  97  97              exas
------------------------------
194 194 194             sdkaok
238  44  44             dkopkw
255  48  48             exp1
</code></pre>

<p>I am not sure what I am doing wrong and it has been driving me insane. </p>