title: Finding the max and min values and printing the line from a file
body: <p>I have a file which has numbers at the first column.</p>
  
  <pre><code>100,red
  101,blue
  102,black
  </code></pre>
  
  <p>I should write a shell script that it will print the line with the max and min numbers.</p>
  
  <pre><code>max=0
  cat file.txt|while read LINE
  do
      fir=`echo $LINE|awk '{print $2}'`
      sec=`echo $LINE|awk '{print $3}'`
      if [ $fir -gt $max ]; then
         max=$fir
      fi
      if [ $sec -gt $max ];then
          max=$sec
      fi
  done
  
  grep $max file.txt
  </code></pre>
  
  <p>This is what i tried so far for finding the max.</p>