diff options
| author | salo <salo@NetBSD.org> | 2003-02-06 15:17:01 +0000 |
|---|---|---|
| committer | salo <salo@NetBSD.org> | 2003-02-06 15:17:01 +0000 |
| commit | d2c9435f39bf3cf490a36374e2dabc08a9c3128b (patch) | |
| tree | 0baf00e5bcb3a745bfd0465ae8566e2901bb14f0 | |
| parent | 3961d5130729d5938bb51ec1204b2b61920720cb (diff) | |
| download | bsdgames-darwin-d2c9435f39bf3cf490a36374e2dabc08a9c3128b.tar.gz bsdgames-darwin-d2c9435f39bf3cf490a36374e2dabc08a9c3128b.zip | |
Use pipe ("|") as a sed command field separator and allow slash ("/")
character in acronyms. (e.g. W/, B/C, ...)
Approved by jdolecek.
| -rw-r--r-- | wtf/wtf | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.7 2000/11/21 00:18:52 soren Exp $ +# $NetBSD: wtf,v 1.8 2003/02/06 15:17:01 salo Exp $ # # Public domain # @@ -19,7 +19,7 @@ rv=0 while [ $# -gt 0 ] ; do target=`echo $1 | tr '[a-z]' '[A-Z]'` ans=`fgrep $target < $acronyms 2>/dev/null \ - | sed -ne "/^$target[[:space:]]/s/^$target[[:space:]]*//p"` + | sed -ne "\|^$target[[:space:]]|s|^$target[[:space:]]*||p"` if [ "$ans" != "" ] ; then echo "$target: $ans" else |
