Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/wtf Allen Briggs' wtf(6) to grovel the acronyms database.
details: https://anonhg.NetBSD.org/src/rev/b4ec9150b1cc
branches: trunk
changeset: 474821:b4ec9150b1cc
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jul 22 01:03:20 1999 +0000
description:
Allen Briggs' wtf(6) to grovel the acronyms database.
diffstat:
games/wtf/Makefile | 7 +++++++
games/wtf/wtf | 30 ++++++++++++++++++++++++++++++
games/wtf/wtf.6 | 43 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 80 insertions(+), 0 deletions(-)
diffs (92 lines):
diff -r 3ed4cd248a16 -r b4ec9150b1cc games/wtf/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/wtf/Makefile Thu Jul 22 01:03:20 1999 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 1999/07/22 01:03:20 mrg Exp $
+
+SCRIPTS= wtf
+SCRIPTSDIR= /usr/games
+MAN= wtf.6
+
+.include <bsd.prog.mk>
diff -r 3ed4cd248a16 -r b4ec9150b1cc games/wtf/wtf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/wtf/wtf Thu Jul 22 01:03:20 1999 +0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $NetBSD: wtf,v 1.1 1999/07/22 01:03:20 mrg Exp $
+#
+# Public domain
+#
+
+acronyms=${ACRONYMDB:-/usr/share/misc/acronyms}
+
+if [ $1 = "is" ] ; then
+ shift
+fi
+
+if [ $# -lt 1 ] ; then
+ echo "Usage: $0 [is] <acronym>"
+fi
+
+rv=0
+while [ $# -gt 0 ] ; do
+ target=`echo $1 | tr '[a-z]' '[A-Z]'`
+ ans=`sed -ne "/^$target/s/^$target[ ]*//p" < $acronyms 2>/dev/null`
+ if [ "$ans" != "" ] ; then
+ echo "$target: $ans"
+ else
+ echo "Gee... I don't know what $1 means..."
+ rv=1
+ fi
+ shift
+done
+exit $rv
diff -r 3ed4cd248a16 -r b4ec9150b1cc games/wtf/wtf.6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/wtf/wtf.6 Thu Jul 22 01:03:20 1999 +0000
@@ -0,0 +1,43 @@
+.\" $NetBSD: wtf.6,v 1.1 1999/07/22 01:03:21 mrg Exp $
+.\"
+.\" Public Domain
+.\"
+.Dd July 21, 1999
+.Dt WTF 1
+.Os
+.Sh NAME
+.Nm wtf
+.Nd translates acronyms for you
+.Sh SYNOPSIS
+.Nm
+.Op Ar is
+.Ar acronym Ar ...
+.Sh DESCRIPTION
+The
+.Nm
+utility displays the expansion of the acronyms
+specified on the command line.
+.Pp
+If
+.Dq is
+is specified on the command line, it will be ignored, allowing the
+fairly natural
+.Dq wtf is WTF
+usage.
+.Sh ENVIRONMENT
+.Bl -tag -width ACRONYMDB
+.It Ev ACRONYMDB
+The default acronym database may be overridden by setting the
+environment variable
+.Ev ACRONYMDB
+to the name of a file in the proper format (acronym[tab]meaning).
+.El
+.Sh FILES
+.Bl -tag -width /usr/share/misc/acronyms -compact
+.It Pa /usr/share/misc/acronyms
+default acronym database.
+.El
+.Sh HISTORY
+.Nm
+first appeared in
+.Nx 1.5 .
Home |
Main Index |
Thread Index |
Old Index