From d2c9435f39bf3cf490a36374e2dabc08a9c3128b Mon Sep 17 00:00:00 2001 From: salo Date: Thu, 6 Feb 2003 15:17:01 +0000 Subject: Use pipe ("|") as a sed command field separator and allow slash ("/") character in acronyms. (e.g. W/, B/C, ...) Approved by jdolecek. --- wtf/wtf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wtf') diff --git a/wtf/wtf b/wtf/wtf index b02ef364..92393e7c 100644 --- a/wtf/wtf +++ b/wtf/wtf @@ -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 -- cgit v1.2.3