Re: [SLUG] need a command

From: Levi Bard (levi@bard.sytes.net)
Date: Wed Apr 07 2004 - 10:56:24 EDT


>>grep -v '[0-9]' file
> No, that will give all of the lines that do contain numbers (but the
> output will include the non-numeric characters. Try:
Oops, I thought he wanted to get rid of all the numeric. Actually, this
will throw out any line WITH numeric characters. To reverse it, `grep -v
'[^0-9]' file`

> sed "s/[^0-9]//g" filename
This will get rid of non-numeric characters, but keep the numbers in
between. I thought we wanted to get rid of any complete line that
contained any non-numerics?
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:14:32 EDT