Timeline for How to output a multiline string in Bash?
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 6, 2021 at 15:03 | comment | added | Eric |
Works. Also note use ' (single quotes) instead of " (double quotes) if you don't want the interpretation of the string. If you want $something or something in the output instead of it getting replaced.
|
|
Oct 19, 2018 at 20:45 | comment | added | s g | Not great if you need this in a function because you'll either need to 1) outdent the string all the way to the left of your file or 2) keep it indented to line up with the rest of your code but then it prints with the indents as well | |
Jun 10, 2012 at 17:05 | comment | added | Dennis Williamson | @OliverWeiler: It will even work in Bourne shells such as Dash and the Heirloom Bourne Shell. | |
Jun 10, 2012 at 15:33 | history | answered | Chris Mohr | CC BY-SA 3.0 |