0

I am writing a batch script that needs to get some log in tab separated format. Problem is that some of the items in the log contains line breaks (\n) and this make lines that don't adhere to the number of columns I expect. is there any way I can replace or ignore or force mysql to write special chars as \x0a etc?

#!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
www.jensolsson.se
  • 3,023
  • 2
  • 35
  • 65

0 Answers0