[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Bug in ash alias handing ?
From:       Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn () axis ! com>
Date:       2016-06-25 19:26:35
Message-ID: alpine.DEB.2.20.1606252117510.24164 () enwn ! fr ! nkvf ! pbz
[Download RAW message or body]

On Sat, 25 Jun 2016, Walter Harms wrote:
> On Fri, 24 Jun 2016, Walter Harms wrote:
> >Try:
>
> >alias idt='grep -o -E "\\\$Id:[^$]+."'
>
> great. works for me !
>
> you changed roles of ' and " , ok.

Yes.  Do not expand anything when setting the alias.  Expand when
executing.

> But why the \\\  double escape for $ but not in the [^$] ?

When executing, the '\\' expands to '\' and '\$' to '$'.  Thus, at
execution time, you get '\$' which is what you want.  Class '[^$]' is
special.  No escaping needed.  Regexp:s.


Cheers,

-- 
Cristian
_______________________________________________
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