bash expansion help
Paul King
sciguy-Ja3L+HSX0kI at public.gmane.org
Sun Feb 4 20:44:06 UTC 2007
[ Charset UTF-8 unsupported, converting... ]
> 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"
Looks easy enough to parse in Perl. Any reason to insist on Bash?
In BASH, I find it easier to parse through a list if you use space
delimiters. I couldn't get it to work with my standard method. I
suggest, if BASH is insisted upon and Perl must be avoided, that you use
sed/awk (probably sed more than awk).
In case you don't know (many seem to think sed is out of "fahsion"), sed
is a parser, like perl (sed stands for Stream editor). THere are some
similarities in syntax, but sed is not a language, like Perl is.
Paul King
>
> 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