3 ms·
Woah, I had no idea multiline strings were even a thing in Bash, I've been using heredocs for help messages since forever! Do you know if these are portable?
by GordonS 6y ago
Woah, I had no idea multiline strings were even a thing in Bash, I've been using heredocs for help messages since forever!
Do you know if these are portable?
- pavon 6y agoAs far as I know. The POSIX spec[1] simply declares that in single quotes all characters will be preserved exactly, except for single quotes, which aren't allowed. Likewise, for double quotes, except that it also performs expansions ($) and allows escaping (\). [1]https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...