7 ms·
Curly braces are POSIX and work fine in dash. (Perhaps when testing you forgot these restrictions, which are the same as in bash: there must be whitespace afte
by anderskaseorg 6y ago
Curly braces are POSIX and work fine in dash. (Perhaps when testing you forgot these restrictions, which are the same as in bash: there must be whitespace after {, and a newline or semicolon before }.)
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
- cb321 6y agoYou are right. Apologies. Seemingly from this [1], quoting such braces was initially recommended. [1] https://www.cs.ait.ac.th/~on/O/oreilly/unix/ksh/appa_02.htm https://www.cs.ait.ac.th/~on/O/oreilly/unix/ksh/appa_02.htm