Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   expr.1p    ( 1 )

оценивать аргументы как выражение (evaluate arguments as an expression)

Обоснование (Rationale)

In an early proposal, EREs were used in the matching expression
       syntax.  This was changed to BREs to avoid breaking historical
       applications.

The use of a leading <circumflex> in the BRE is unspecified because many historical implementations have treated it as a special character, despite their system documentation. For example:

expr foo : ^foo expr ^foo : ^foo

return 3 and 0, respectively, on those systems; their documentation would imply the reverse. Thus, the anchoring condition is left unspecified to avoid breaking historical scripts relying on this undocumented feature.