如何在shell 中将sql语句执行结果写入日志中

2025-03-06 02:54:48
推荐回答(1个)
回答1:

输出重定向
#! /bin/sh
mysql -uappdbuser -p123457 -D eeee -e "update areacode set name='oooxxxx' where code=1234567890;" |tee -a result.log