Formatting SHOW ENGINE INNODB STATUS outputs when “\n” are embedded as Text
awk, mysql, newline, sed, shell
Solution
You can use the following syntax of sed.
sed -i -e 's|\\n|\n|g' mydumpfile.txt
If you want the direct output properly from mysql then use --table option in mysql command.
mysql --table -e "show engine innodb status" -u -p database > mydumpfile.txt
Problem
I am referring to this link I have an output via this command: `mysql -e "show engine innodb status" -u -p database > mydumpfile.txt` However, any editor I use (less, vim, kwrite) is showing the `\n` instead of a real new line. How can I accomplish the replacement with sed, awk or any other tool in a shell?