summaryrefslogtreecommitdiff
path: root/bin/expr/expr.1
AgeCommit message (Collapse)Author
2023-08-16Remove $FreeBSD$: two-line nroff patternWarner Losh
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2016-10-05Document origins of expr & authorsSevan Janiyan
http://minnie.tuhs.org/cgi-bin/utree.pl?file=PWB1/usr/man/man1/expr.1 PR: 173979 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Notes: svn path=/head/; revision=306719
2015-04-26Pet manlintBaptiste Daroussin
Notes: svn path=/head/; revision=282002
2015-04-26Use mdoc(7) macros for curly bracesBaptiste Daroussin
Notes: svn path=/head/; revision=281998
2012-05-13Minor mdoc nits.Joel Dahl
Notes: svn path=/head/; revision=235400
2012-02-25Whitespace cleanup:Glen Barber
o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157 Notes: svn path=/head/; revision=232158
2012-02-25Fix various typos in manual pages.Glen Barber
Submitted by: amdmi3 PR: 165431 MFC after: 1 week Notes: svn path=/head/; revision=232157
2011-07-09Make /bin/expr support 64bit numeric range and range checks by default,Stefan Eßer
again. This brings back the behaviour of expr in FreeBSD-4, which had been reverted due to an assumed incompatbility with POSIX.1 for FreeBSD-5. This issue has been discussed in the freebsd-standards list, and the consensus was, that POSIX.1 is in fact not violated by this extension, since it affects only cases of POSIX undefined behaviour (overflow of signed long). Other operating systems did upgrade their versions of expr to support 64bit range, after it had been initially brought to FreeBSD. They have used it for a decade without problems, meanwhile. The -e option is retained, but it will only select less strict checking of numeric parameters (leading white-space, leading "+" are allowed and skipped, an empty string is considered to represent 0 in numeric context.) The call of check_utility_compat() as a means of establishing backwards compatibility with FreeBSD-4 is considered obsolete, but preserved in this commit. It is expected to be removed in a later revision of this file. Reviewed by: bde, das, jilles MFC after: 2 month (those parts that do not violate POLA) Notes: svn path=/head/; revision=223881
2010-09-09expr(1): Add sh(1) versions of examples, remove an incorrect example.Jilles Tjoelker
The three examples are better done using sh(1) itself these days. The example expr -- "$a" : ".*" is incorrect in the general case, as "$a" may be an operator. MFC after: 2 weeks Notes: svn path=/head/; revision=212390
2007-03-04Fix markup.Ruslan Ermilov
Notes: svn path=/head/; revision=167210
2005-01-16Add the new standard EXIT STATUS section where appropriate.Ruslan Ermilov
Sort standard sections in the (documented) preferred order. Notes: svn path=/head/; revision=140353
2005-01-13Removed harmful empty lines that crept in during the copyrightRuslan Ermilov
header update. Notes: svn path=/head/; revision=140169
2005-01-10/*- or .\"- or #- to begin license clauses.Warner Losh
Notes: svn path=/head/; revision=139969
2004-07-12Remove BUGS section that talked about missing multibyte character support.Tim J. Robbins
We have support now that the regular expression routines do. Notes: svn path=/head/; revision=132029
2004-07-03Document missing multibyte character handling in utilities specifiedTim J. Robbins
by POSIX. Notes: svn path=/head/; revision=131513
2002-11-26mdoc(7) police:Ruslan Ermilov
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai] strings; using these strings is unsafe in troff mode, as they include a change in a font size. Approved by: re Notes: svn path=/head/; revision=107282
2002-11-25mdoc(7) police: markup fixes.Ruslan Ermilov
Approved by: re Notes: svn path=/head/; revision=107226
2002-10-28Create a small library function, check_utility_compat(3), to determineGarrett Wollman
whether a named utility should behave in FreeBSD 4.x-compatible mode or in a standard mode (default standard). The configuration is done malloc(3)-style, with either an environment variable or a symlink. Update expr(1) to use this new interface. Notes: svn path=/head/; revision=106065
2002-05-29mdoc(7) police: markup nits.Ruslan Ermilov
Notes: svn path=/head/; revision=97464
2002-05-11EXPR_COMPAT should imply -e, since there is no way to specify it otherwise,Garrett Wollman
and -e reflects the historic behavior of FreeBSD's expr. Notes: svn path=/head/; revision=96382
2002-05-10The response to my POSIX interpretation request says that `expr'Garrett Wollman
is required to be oblivious to overflow and to use the data type `long'. (Division by zero is undefined in ISO C so it's still OK to check for it here.) Add a new `-e' flag to get the old, more useful behavior. Notes: svn path=/head/; revision=96367
2002-04-22Provide an environment variabloe, EXPR_COMPAT, which disables optionGarrett Wollman
parsing for compatibility with old implementations. Notes: svn path=/head/; revision=95278
2002-03-22Typo (if => of).Garrett Wollman
Notes: svn path=/head/; revision=92984
2002-03-22Add a word of caution about integer arithmetic range and overflow detection.Garrett Wollman
Notes: svn path=/head/; revision=92983
2002-03-22Fix a few formatting brainos and make the formatting of the EXAMPLESGarrett Wollman
section somewhat clearer. Notes: svn path=/head/; revision=92982
2002-03-22Make expr POSIX-compliant, and fix some bugs. Specifically:Garrett Wollman
- expr must conform to the Utility Syntax Guidelines, so use getopt() to eat the (non-existent) options. - Use the Standard type intmax_t for arithmetic. - If an argument cannot be *completely* converted to an integer, then it is a string. Additionally make some style cleanups near the modified lines. This utility is still not completely style-compliant. Notes: svn path=/head/; revision=92979
2001-07-15Remove whitespace at EOL.Dima Dorfman
Notes: svn path=/head/; revision=79754
2000-12-15Prepare for mdoc(7)NG.Ruslan Ermilov
Notes: svn path=/head/; revision=70056
2000-11-20mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov
Notes: svn path=/head/; revision=68935
1999-08-27$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50471
1998-12-18Add cross-references to test(1) and expr(1) respectively.Joseph Koshy
PR: docs/9111 Submitted by: Josh Gilliam <josh@quick.net> Notes: svn path=/head/; revision=41915
1998-05-13Correct use of .Nm.Philippe Charnier
Notes: svn path=/head/; revision=36011
1997-02-22Revert $FreeBSD$ to $Id$Peter Wemm
Notes: svn path=/head/; revision=22988
1997-01-14Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
1996-01-29Fix some spelling errors.Mike Pritchard
Notes: svn path=/head/; revision=13719
1994-04-24Fix gross spelling and typographical errors pointed out by Keith Bostic.Jordan K. Hubbard
Notes: svn path=/head/; revision=1411
1993-10-04Document the new, less restrictive, behavior of the matching operator.J.T. Conklin
Notes: svn path=/head/; revision=540
1993-07-21Update to my latest expr (fixes bugs with comparison and matching operators)J.T. Conklin
Add man page I wrote. Notes: svn path=/head/; revision=181