RE: [Nolug] Bash question

From: David John <djohn_at_archdiocese-no.org>
Date: Fri, 20 Apr 2007 14:43:59 -0500
Message-ID: <00de01c78384$3d630610$b8291230$@org>

> -----Original Message-----
> From: owner-nolug@redfishnetworks.com [mailto:owner-
> nolug@redfishnetworks.com] On Behalf Of Friedrich Gurtler
> Sent: Friday, April 20, 2007 2:26 PM
> To: nolug@nolug.org
> Subject: Re: [Nolug] Bash question
>
> On 4/20/07, B. Estrade <estrabd@gmail.com> wrote:
> I tried various ways to expand the value such that it did the
> implied enumeration, but I could not get it to work.
>
> Quoting the manual:
>
> Brace expansion is performed before any other expansions, and any
> characters special to other expansions are preserved in the result. It
> is strictly textual. Bash does not apply any syntactic interpretation
> to the context of the expansion or the text between the braces.
>
> There are patches to bash out there that allow variable substitution in
> range expansion, but I doubt anyone is looking to patch bash.  So that
> particular construct cant be used in this case.
>
> Now, if you wanted to pass in the entire range to the script, instead
> of the last letter, you could do this:
>
> ./script {A..Q}
>
> And inside the script you do:
> VAR = "$@" instead of VAR="$1"
>
> But I see you already have a solution, so its all six one way, half a
> dozen the other.
>
> -- Fritz

Interesting. Thanks Fritz.

Dave

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.5.5/769 - Release Date: 4/19/2007
5:56 PM
 
This message has been scanned by the Internet Service Departments Virus/Spam filter.
___________________
Nolug mailing list
nolug@nolug.org
Received on 04/20/07

This archive was generated by hypermail 2.2.0 : 12/19/08 EST