Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编写一个批处理脚本,该脚本需要以制表符分隔格式获取一些日志。问题是日志中的某些项目包含换行符 (\n),这使得行不符合我期望的列数。有什么方法可以替换或忽略或强制 mysql 将特殊字符写为 \x0a 等?
#!bash mysql --defaults-extra-file=my.cnf --database db -e "SELECT * FROM db.Log ORDER BY ID DESC LIMIT 1,10;" -r -s -N 2>/dev/null