Re: extract field
- From: rvaede <rvaedex23@xxxxxxxxx>
- Date: Thu, 6 May 2010 14:39:47 -0700 (PDT)
On May 6, 3:46 pm, Ed Morton <mortons...@xxxxxxxxx> wrote:
On 5/6/2010 2:24 PM, rvaede wrote:
How can I extract the number from this line?
<process_id>25752</process_id>
I want to extract "25752"
regards
There are many ways. Here's one that may or may not work with your shell:
$ x="<process_id>25752</process_id>"
$ echo "${x//[^[:digit:]]/}"
25752
Ed.
Thank you.
.
- References:
- extract field
- From: rvaede
- Re: extract field
- From: Ed Morton
- extract field
- Prev by Date: Re: print head and tail
- Next by Date: Re: crontab environment problem
- Previous by thread: Re: extract field
- Next by thread: Re: extract field
- Index(es):