summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2005-11-21 08:34:27 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2005-11-21 08:34:27 +0000
commit47d580c0b08facdb99c1914404b470052af593c8 (patch)
tree6c92277209b9acf5d3f93489028c27f6b80c5065 /usr.bin
parentcdbf55f3b6fd801d16e6e2221e5bab4f942d97a1 (diff)
add EXAMPLES section; input+ok jmc, niallo ok
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/ident.127
1 files changed, 26 insertions, 1 deletions
diff --git a/usr.bin/rcs/ident.1 b/usr.bin/rcs/ident.1
index 8331a592984..bb590a80858 100644
--- a/usr.bin/rcs/ident.1
+++ b/usr.bin/rcs/ident.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ident.1,v 1.2 2005/10/19 16:15:36 xsa Exp $
+.\" $OpenBSD: ident.1,v 1.3 2005/11/21 08:34:26 xsa Exp $
.\"
.\" Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
.\" All rights reserved.
@@ -43,6 +43,31 @@ Quiet mode, suppress warnings if no pattern found.
.It Fl V
Display version information and exit.
.El
+.Sh EXAMPLES
+Given the following source code in file
+.Pa foo.c :
+.Bd -literal -offset indent
+#include <stdio.h>
+
+static char const rcsid[] =
+ "$\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $";
+
+int
+main(void) {
+ printf("%s\en", rcsid);
+ return (0);
+}
+.Ed
+.Pp
+Compile it and run
+.Nm :
+.Bd -literal -offset indent
+$ ident foo.c foo.o
+foo.c:
+ $\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $
+foo.o:
+ $\&Id: foo.c,v 1.2 2005/11/18 09:34:51 xsa Exp $
+.Ed
.Sh SEE ALSO
.Xr ci 1 ,
.Xr co 1 ,