title: Unix Shell Script: Reading and working with MySQL Rows line by line
body: <p>I want a shell script (ubuntu) which fetchs data from a sql table row by row!
  And i want to have access on <strong>EACH</strong> row, e.g. to Check with a simple if statement, u know?</p>
  
  <pre><code>#!/bin/bash
  TIME=`date +"%T"`
  echo true  &gt; log/ausgefuehrt-$TIME.log
  /opt/lampp/lampp start
  echo $TIME
  
  #ASSIGNING MYSQL
  MYSQL=/opt/lampp/bin/mysql
  #$MYSQL -e"select * from ftp.ftp" -u root
  $MYSQL -e"select * from ftp.ftp"
  
  #STARTING TO FETCH EACH ROW (trying)
  WHILE read ROW ;
          do echo $ROW # HERE &lt;&lt;&lt; is the problem.. i dont know how to access each row :/
  done
  exit
  </code></pre>