Feedback

type to search

By: Asked

How to represent strings with control characters (like \n \t) in bash?

How to represent strings with control characters (like \n \t) in bash?

0

belkka

Solution that I found in “man 1 bash” (section QUOTING):


$‘hello\nworld’

echo \$‘hello\nworld’ == echo -e ‘hello\nworld’ == printf ‘hello\nworld’
or Cancel
You need to join Debian to complete this action, click here to do so.