Re: extract field
- From: Sidney Lambe <sidneylambe@xxxxxxxxxxxxxxxxx>
- Date: 9 May 2010 07:13:01 +0200
On comp.unix.shell, rvaede <rvaedex23@xxxxxxxxx> wrote:
How can I extract the number from this line?
<process_id>25752</process_id>
I want to extract "25752"
regards
echo "<process_id>25752</process_id>" | sed -n 's|\(<[^>]*>\)\(.*\)\(<[^>]*>\)|\2|p'
Sid
.
- References:
- extract field
- From: rvaede
- extract field
- Prev by Date: Re: size of a directory
- Next by Date: Exit status of process by PID
- Previous by thread: Re: extract field
- Next by thread: print head and tail
- Index(es):