[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf -v doesn't allow array assignment

From: Chet Ramey
Subject: Re: printf -v doesn't allow array assignment
Date: Sun, 19 Jul 2009 21:21:45 -0400
User-agent: Thunderbird (Macintosh/20090605)

Chris F.A. Johnson wrote:
> $ printf -v q[2] "%s" "$RANDOM"
> bash: printf: `q[2]': not a valid identifier
>     I know I can work around it with a temporary variable, but it
>     would be nice if it could be done in a single step.

That could be a useful extension.  It will probably find its way into
a future version.

``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]