diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-28 16:52:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-05-28 16:52:14 +0200 |
commit | d2d15fd4f70da8959d8222229c4e12c85ead8db3 (patch) | |
tree | 23834f26a31c029669c97813696848003d107882 /doc/testscript.cli | |
parent | c9afe583c8cdb1d9ee72f482649f323e7f7773d7 (diff) |
Add example of doubled single-quoting idiom
Diffstat (limited to 'doc/testscript.cli')
-rw-r--r-- | doc/testscript.cli | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/testscript.cli b/doc/testscript.cli index 189018e..4c585ec 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -1320,6 +1320,17 @@ args = \'&foo\' # '&foo' echo $args # echo &foo \ +To make sure that a string is passed as is through both expansions use the +\i{doubled single-quoting} idiom, for example: + +\ +filter = sed -e \''s/foo (bar|baz)/$&/'\' +$* <<EOI | $filter >>EOO +... +EOI +... +EOO +\ \h1#syntax|Syntax and Semantics| |