Hallo. On Thu, Sep 13, 2007 at 09:19:38PM +0200, Sam Ravnborg wrote: []That particular one-line `ALTARCH := i386' of course can be matched simpler, because there's only *one* (as written above) whitespace and no make's assignment variations, like (?=,=). I wonder, if there can be more options, than i386 and more occurrences of `ALTARCH' actually :) Also, make can have lead whitespace on line start, as well as near assignment sign, if that matters. So, to match *one* line with *one* `ALTARCH' followed by `i386' sed -n '/ALTARCH/{/i386/{p ; q}}' is fine by me. If there are dis-assignments, so to speak, or comments with i386 this will not work obviously. But it's fast and must work with variety of make syntax. Check is "for non empty output". Also, please take a look on man isspace(). It matches much more characters, than necessary for ordinary syntax whitespace. Using [:blank:] (i.e. tab and space, with no options) is OK. Last thing: i'm not sure, what that `+' is. I stick to BRE in sed, as it should be, so just don't know what it does. Hope that helps. ____ -
| David Miller | Re: Slow DOWN, please!!! |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Greg KH | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Josip Rodin | bnx2_poll panicking kernel |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
