Re: extract field



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.
.