[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Fwd: Re: stability of column-widths in output from df, route etc
From: "David Collier" <from_busybox_maillist () dexdyne ! com>
Date: 2010-11-29 11:34:00
Message-ID: memo.20101129113429.11676B () postmaster+dexdyne ! com ! cix ! co ! uk
[Download RAW message or body]
In article <4CF05BDC.3090408@triad.rr.com>, doug.clapp@triad.rr.com (Doug
Clapp) wrote:
> *From:* Doug Clapp <doug.clapp@triad.rr.com>
> *To:* busybox <busybox@busybox.net>
> *Date:* Fri, 26 Nov 2010 20:16:12 -0500
>
> I'm a fan of awk. Seems to me one awk would do what sed... | cut
> or tr ...| cut would do - i.e. separate fields on one or more
> consecutive space characters and allow you to pick the field(s) you
> want.
I need to learn awk - I don't think it was in my previous build of
busybox, but I'm putting it in right now.
D
>
> Doug
>
> -------- Original Message --------
> Subject: Re: stability of column-widths in output from df, route
> etc
> Date: Fri, 26 Nov 2010 15:32:42 +0100
> From: walter harms <wharms@bfs.de>
> Reply-To: wharms@bfs.de
> To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> CC: busybox@busybox.net
>
>
>
> Am 26.11.2010 13:06, schrieb Joakim Tjernlund:
> >>
> >> On Fri, Nov 26, 2010 at 11:00 AM, David Collier
> >> <from_busybox_maillist@dexdyne.com> wrote:
> >>> I have some scripts which manipulate the output of route, and
> df, by
> >>> using cut -c8-12 or similar to extract the info I want.
> >>>
> >>> How risky is this - what are the chances of someone making a
> column wider
> >>> or narrower in a future issue of busybox?
> >>>
> >>> Is there a better technique?
> >>
> >> Trim all whitespace to single spaces (sed 's/ */ /g'),
> >> then separate fields on the space char.
> >
> > Yes, although it should probably be sed 's/ \+/ /g'
> >
>
> just because i am fan of "tr"
> tr -s " "
>
> re,
> wh
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic