Dialog vs. '\n'
I'm trying to use dialog to show some data, but unfortunatly the data might contain "\n" substring (2 ch开发者_C百科aracters: \ and n, and not literal enter character).
It looks that whatever I will do, dialog interprets those \n as literal enter, and breaks the content.
For example you can try:
dialog --infobox "a\\nb" 10 10
and:
echo "a\\nb"
Is there any way to disable this \n interpolation, or escape it somehow? I tried with up to 6 \ characters in front of \ but it doesn't help.
This should do the trick, however it doesn't seem you can mix both types. You either have "forced" \n
interpretation, or none at all:
dialog --no-nl-expand ...
精彩评论