[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49612F69.8080804@opensde.org>
Date: Sun, 04 Jan 2009 22:51:37 +0100
From: Alejandro Mery <amery@...nsde.org>
To: Valdis.Kletnieks@...edu
CC: Rob Landley <rob@...dley.net>, Ingo Oeser <ioe-lkml@...eria.de>,
Embedded Linux mailing list <linux-embedded@...r.kernel.org>,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>, Sam Ravnborg <sam@...nborg.org>
Subject: Re: [PATCH 1/3]: Replace kernel/timeconst.pl with kernel/timeconst.sh
Valdis.Kletnieks@...edu wrote:
> Close, but no cee-gar. cut does something counter-intuitive with multiple
> blanks:
>
> % echo 'a b' | awk '{print $2}'
> b
> % echo 'a b' | cut -d' ' -f2
>
> % echo 'a b' | sed -r 's/[ ]+/ /g' | cut -d' ' -f2
> b
>
> Unfortunately, 'sed -r' isn't in the opengroup.org list of required options,
> and sed 's/ / /g' doesn't DTRT for 3 or more blanks (as it won't recursively
> apply the change to a *new* double blank formed by the previous change).
echo 'a b' | tr -s ' ' | cut -d' ' -f2
b
that is the light way ;-)
Alejandro Mery
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5013 bytes)
Powered by blists - more mailing lists