Jilles Tjoelker a62ab0274a sh: Add $'quoting' (C-style escape sequences).
A string between $' and ' may contain backslash escape sequences similar to
the ones in a C string constant (except that a single-quote must be escaped
and a double-quote need not be). Details are in the sh(1) man page.

This construct is useful to include unprintable characters, tabs and
newlines in strings; while this can be done with a command substitution
containing a printf command, that needs ugly workarounds if the result is to
end with a newline as command substitution removes all trailing newlines.

The construct may also be useful in future to describe unprintable
characters without needing to write those characters themselves in 'set -x',
'export -p' and the like.

The implementation attempts to comply to the proposal for the next issue of
the POSIX specification. Because this construct is not in POSIX.1-2008,
using it in scripts intended to be portable is unwise.

Matching the minimal locale support in the rest of sh, the \u and \U
sequences are currently not useful.

Exp-run done by: pav (with some other sh(1) changes)
2011-05-05 20:55:55 +00:00
..
2009-10-15 18:17:29 +00:00
2010-06-02 09:34:41 +00:00
2009-01-30 16:23:57 +00:00
2011-02-21 09:01:34 +00:00
2006-12-18 15:45:01 +00:00
2011-02-12 20:28:15 +00:00
2009-06-23 23:30:56 +00:00
2011-02-21 16:03:39 +00:00
2011-03-15 22:22:11 +00:00
2006-12-27 11:28:00 +00:00
2009-09-04 21:49:37 +00:00
2011-02-04 16:40:50 +00:00
2011-03-15 22:22:11 +00:00
2010-02-15 14:07:40 +00:00
2006-12-27 12:14:56 +00:00
2011-03-15 22:22:11 +00:00
2009-10-15 18:17:29 +00:00
2010-09-13 01:29:51 +00:00