I don't know much about awk, so I won't be able to answer your question. However, to simply remove whole lines, I would use grep:
grep -v '|0.000000|' [filename] Hope this is helpful. -wes On Thu, Mar 3, 2011 at 1:52 PM, Rich Shepard <[email protected]>wrote: > I wrote this little script: > > BEGIN { FS="|" } > {if ($2 != 0.000000) > print $1"|"$2"|"$3} > END {print NR} > > to remove lines like this: > > 29608|0.000000|0.000000 > > from a file with 110K lines. While I thought it was working properly it > leaves these lines looking like this: > > 29608|| > > I've looked in my O'Reilly sed/awk book and don't see my error. What have > I done incorrectly? > > Rich > _______________________________________________ > PLUG mailing list > [email protected] > http://lists.pdxlinux.org/mailman/listinfo/plug > _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
