bash expansion help
Christopher Friedt
cfriedt-u6hQ6WWl8Q3d1t4wvoaeXtBPR1lH4CV8 at public.gmane.org
Sun Feb 4 21:22:40 UTC 2007
Don't grep, awk, sed, and tr seem to ultimately solve all of life's
problems?
$ arm_opts="GENERIC_ARM
ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}"
$ echo ARM920T | grep -e "$(echo $arm_opts | sed '{s/ /|/}')"
ARM920T
~/Chris
Christopher Friedt wrote:
> Hi everyone,
>
> I'm trying to find some method to expand this variable $arm_opts:
>
> "GENERIC_ARM ARM{610,710,720T,920T,922T,926T,_{SA110,SA1100,XSCALE}}"
>
> to this:
>
> "GENERIC_ARM ARM610 ARM710 ARM720T ARM920T ARM922T ARM926T ARM_SA110
> ARM_SA1100 ARM_XSCALE"
>
> in bash.
>
> Any tips ?
>
>
> Thanks,
>
> ~/Chris
> --
> The Toronto Linux Users Group. Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
>
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list