I am making a cgi script that reads the content of a sql database and displays them inside a table. I want to put a condition for column that if the text inside it the date today i want to have a green background color for the cell.
The line i want to ad the condition is :
echo '
'echo ''
echo "
"echo "
echo "
lfd.IDName/OrtLast Seen"for line in $(sqlite3 onlinestatus.sqlite "SELECT playerid,name,lastseen,lfd FROM devices WHERE playerid = "1234"
do
echo "
"echo "
$(echo ${line}|cut -d "|" -f 4)"echo "
$(echo ${line}|cut -d "|" -f 1)"echo "
$(echo ${line}|cut -d "|" -f 2)"echo "
$(echo ${line}|cut -d "|" -f 3)"echo "
"done
echo "
"I want to add to this line the condition so if the ${line} is todays date the background color for the cell is green or any other color
echo "
$(echo ${line}|cut -d "|" -f 1)"