Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [zsh] Extracting Informations from strings
- X-seq: zsh-users 7575
- From: Artur Penttinen <artur+sunsite.dk@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: [zsh] Extracting Informations from strings
- Date: Mon, 21 Jun 2004 10:24:16 +0300
- In-reply-to: <w4dzn6xmm0b.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <w4dzn6xmm0b.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
On Mon, 21 Jun 2004, Stefan [iso-8859-1] ReichЖr wrote:
> Date: Mon, 21 Jun 2004 09:02:44 +0200
> From: "Stefan [iso-8859-1] ReichЖr" <xsteve@xxxxxxx>
> To: zsh-users@xxxxxxxxxx
> Subject: [zsh] Extracting Informations from strings
>
> Hi!
>
> I want to parse the output from acpi:
> Battery 1: charging, 95%, charging at zero rate - will never fully charge.
>
> I want to extract the "95%" from the output above.
>
> How can I achieve this from within zsh?
# print "Battery 1: charging, 95%, charging at zero rate - will never fully charge." | cut -d, -f2
95%
#
--
artur penttinen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author