Comment by 🥬 lamb-duh

Re: "When I start to wander into the weeds of POSIX shell, I…"

In: s/Linux

the use case for this is to break up a long string that should not have space inserted in it:

🥬 lamb-duh

Apr 20 · 2 weeks ago

Original Post

🌒 s/Linux

🚀 jsreed5:

When I start to wander into the weeds of POSIX shell, I come across some wacky stuff. Today's find: Backslash-escaped newlines (used for breaking up a command over multiple lines) are discarded entirely when parsing a line. That means any token that is split using a backslash-escaped newline, if there is no other whitespace present, is reassembled into a single token by the shell. If your shell is POSIX-compliant (most are), you can see this effect for yourself. Running [preformatted] is…

💬 1 comment · 2 likes · Apr 20 · 2 weeks ago