bug-bash
[Top][All Lists]
Advanced

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

printf -v doesn't allow array assignment


From: Chris F.A. Johnson
Subject: printf -v doesn't allow array assignment
Date: Fri, 17 Jul 2009 22:02:31 -0400 (EDT)
User-agent: Alpine 2.00 (NEB 1167 2008-08-23)


$ 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.


--
   Chris F.A. Johnson                      <http://cfaj.freeshell.org>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)




reply via email to

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