lkml.org 
[lkml]   [2012]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] perf, tool: Add new event group management

* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Wed, 2012-03-21 at 10:52 +0100, Ingo Molnar wrote:
> > * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >
> > > # echo {}
> > > {}
> > > # echo {en,dis}able
> > > enable disable
> > >
> > >
> > > It somehow special cases {}, which is horrible.
> >
> > Oh, indeed: brace expansion and sequence expressions both use
> > curly braces:
> >
> > $ echo foo-{a,b,c}-bar
> > foo-a-bar foo-b-bar foo-c-bar
> >
> > $ echo {1..10}
> > 1 2 3 4 5 6 7 8 9 10
> >
> > Too bad, it would be rather intuitive. All the brace characters
> > are taken by Bash.
> >
> > Maybe something like:
> >
> > $ echo /minor-faults,major-faults/
> > /minor-faults,major-faults/
> >
> > although it looks a bit weird.
> >
> > So ... how about using another grouping operator, such as '+'?
> >
> > Something like:
> >
> > -e minor-faults+major-faults
> >
> > While when comma separated they are not grouped, or so.
>
> I would much prefer a syntax that's more natural but requires
> quoting than one that's quirky and tailor made to avoid
> whatever current bash does. For one, there's other shells out
> there that might have different quoting needs and bash is of
> course free to extend its syntax.

Well, they are unlikely to extend to '+', it would break a
boatload of scripts I suspect.

So the question would be, is a+b+c as event grouping a natural
syntax? If not then lets use a quoted one that is.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-03-21 13:17    [W:0.061 / U:3.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site