Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2011 20:55:55 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/bin/sh mksyntax.c parser.c sh.1 src/tools/regression/bin/sh/parser dollar-quote1.0 dollar-quote2.0 dollar-quote3.0 dollar-quote4.0 dollar-quote5.0 dollar-quote6.0 dollar-quote7.0 dollar-quote8.0 dollar-quote9.0
Message-ID:  <201105052057.p45Kv33j050011@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jilles      2011-05-05 20:55:55 UTC

  FreeBSD src repository

  Modified files:
    bin/sh               mksyntax.c parser.c sh.1 
  Added files:
    tools/regression/bin/sh/parser dollar-quote1.0 dollar-quote2.0 
                                   dollar-quote3.0 dollar-quote4.0 
                                   dollar-quote5.0 dollar-quote6.0 
                                   dollar-quote7.0 dollar-quote8.0 
                                   dollar-quote9.0 
  Log:
  SVN rev 221513 on 2011-05-05 20:55:55Z by jilles
  
  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)
  
  Revision  Changes    Path
  1.35      +2 -0      src/bin/sh/mksyntax.c
  1.109     +139 -6    src/bin/sh/parser.c
  1.161     +71 -2     src/bin/sh/sh.1
  1.1       +12 -0     src/tools/regression/bin/sh/parser/dollar-quote1.0 (new)
  1.1       +5 -0      src/tools/regression/bin/sh/parser/dollar-quote2.0 (new)
  1.1       +22 -0     src/tools/regression/bin/sh/parser/dollar-quote3.0 (new)
  1.1       +19 -0     src/tools/regression/bin/sh/parser/dollar-quote4.0 (new)
  1.1       +12 -0     src/tools/regression/bin/sh/parser/dollar-quote5.0 (new)
  1.1       +5 -0      src/tools/regression/bin/sh/parser/dollar-quote6.0 (new)
  1.1       +6 -0      src/tools/regression/bin/sh/parser/dollar-quote7.0 (new)
  1.1       +11 -0     src/tools/regression/bin/sh/parser/dollar-quote8.0 (new)
  1.1       +8 -0      src/tools/regression/bin/sh/parser/dollar-quote9.0 (new)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105052057.p45Kv33j050011>