Date: Sat, 29 Nov 2008 20:59:51 -0800 From: Gary Kline <kline@thought.org> To: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: for awk experts only. Message-ID: <20081130045944.GA94896@thought.org>
next in thread | raw e-mail | index | archive | help
wordnet/wn prints the string "noun" out whereas I'd rather it simply printed "n." Is there a way of making this substitution using awk? (I've never used awk except as a cmdline filter.) The following fails: wn foot -over |grep Overview |awk {if(!strcmp($3,"noun"))$3="n."; '{printf("%s %s\n", $4, $3);}}' If there are any shortcuts, please clue me in! -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081130045944.GA94896>