bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Move sha1 to C?


From: Bruno Haible
Subject: Re: Move sha1 to C?
Date: Tue, 24 May 2011 11:43:24 +0200
User-agent: KMail/1.9.9

Ralf Wildenhues wrote:
> It's even easier to read this way IMVHO (and just as portable):
> 
>   sed_extract_condition2='
>     /^ *'"$escaped_dep"' *\[\(.*\)\] *$/ s//\1/p
>   '

Well, "easier to read" means that you have understood this paragraph from
the 'sed' specification [1]

  If an RE is empty (that is, no pattern is specified) sed shall behave
  as if the last RE used in the last command applied (either as an
  address or as part of a substitute command) was specified.

or from the GNU sed documentation [2]

  The empty regular expression ‘//’ repeats the last regular expression
  match (the same holds if the empty regular expression is passed to the
  s command). Note that modifiers to regular expressions are evaluated
  when the regular expression is compiled, thus it is invalid to specify
  them together with the empty regular expression.

It counts as an advanced feature of 'sed' for me.

Bruno

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
[2] http://www.gnu.org/software/sed/manual/html_node/Addresses.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]