I want a shell script (ubuntu) which fetchs data from a sql table row by row! And i want to have access on EACH row, e.g. to Check with a simple if statement, u know?
#!/bin/bash
TIME=`date +"%T"`
echo true > 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 <<< is the problem.. i dont know how to access each row :/
done
exit