summaryrefslogtreecommitdiff
path: root/bin/expr/expr.1
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-10-18 06:55:11 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-10-18 06:55:11 +0000
commit3e6f48209fb1159a6ceb04d1acc6f1add775fc45 (patch)
tree72ceb92bea0f90da3a9209d6929cec5ee0f1df08 /bin/expr/expr.1
parenta6174cd0b609f882475db2af94f6559e5a5e6ff8 (diff)
Add some rudimentary EXAMPLES sections and standardize the way we display
existing EXAMPLES sections.
Diffstat (limited to 'bin/expr/expr.1')
-rw-r--r--bin/expr/expr.115
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/expr/expr.1 b/bin/expr/expr.1
index 169addc3c3f..100310d3e55 100644
--- a/bin/expr/expr.1
+++ b/bin/expr/expr.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: expr.1,v 1.9 2000/03/17 18:15:13 aaron Exp $
+.\" $OpenBSD: expr.1,v 1.10 2000/10/18 06:55:08 aaron Exp $
.\" $NetBSD: expr.1,v 1.9 1995/04/28 23:27:13 jtc Exp $
.\"
.\" Written by J.T. Conklin <jtc@netbsd.org>.
@@ -74,10 +74,12 @@ otherwise, returns 0.
.Pp
Parentheses are used for grouping in the usual manner.
.Sh EXAMPLES
+.Cm a=`expr $a + 1`
+.Pp
Add 1 to the variable
-.Va a :
+.Va a .
.Pp
-.Dl a=`expr $a + 1`
+.Cm expr "//$a" \&: '.*/\e(.*\e)'
.Pp
Return the filename portion of a pathname stored
in variable
@@ -86,13 +88,10 @@ The
.Ql //
characters act to eliminate ambiguity with the division operator.
.Pp
-.Dl expr "//$a" Li : '.*/\e(.*\e)'
+.Cm expr $a \&: '.*'
.Pp
Return the number of characters in variable
-.Va a :
-.Pp
-.Dl expr $a Li : '.*'
-.Pp
+.Va a .
.Sh DIAGNOSTICS
The
.Nm