For Programmers: Free Programming Magazines  


Home > Archive > AWK > February 2007 > Re: Newbie AWK problem.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Newbie AWK problem.
Chris UK

2007-02-14, 7:57 am

On 14 Feb, 13:35, "Xicheng Jia" <xich...@gmail.com> wrote:
> On Feb 14, 8:19 am, "Chris UK" <chris.bai...@myrealbox.com> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ... | awk '{ gsub (/([^0-9.])/,"",$1); print $1}'
>
> Regards,
> Xicheng- Hide quoted text -
>
> - Show quoted text -


Xicheng,

Thanks for the reply.

The output of that regex seems similar to that of {print $1+0}, and
anything that results in a zero value output is lost (0/) for example.

Any other thoughts?

All best,
Chris.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com