html if语句添加td,bash - If condition inside <td> HTML - Stack Overflow

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)"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值