3 ms·
ksh's %q prefers quotes; for your example it prints 'text with spaces', and for the article's example, $'This string \'has single\' "and double" quotes and
by kps 6y ago
ksh's %q prefers quotes; for your example it prints 'text with spaces', and for the article's example,
$'This string \'has single\' "and double" quotes and a $'
vs bash's %q,
This\ string\ \'has\ single\'\ \"and\ double\"\ quotes\ and\ a\ \$