Re: [SLUG] need a command

From: Levi Bard (levi@bard.sytes.net)
Date: Wed Apr 07 2004 - 09:08:32 EDT


>
> I need to rid a numeric file of all lines that contain non-numeric
> characters ie [0-9]. In other words I only want numbers in that file.
> I think I recall seeing a sed statement that deleted anything except
> 0-9. I just don't recall the systax.
> I have tried the ! thinking it would do the trick but it does not.
> Can anyone help me with this?

grep -v '[0-9]' file
-----------------------------------------------------------------------
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:13:57 EDT