[Assorted-commits] SF.net SVN: assorted: [526] sandbox/trunk/src/bash/empty-array.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-29 03:37:11
|
Revision: 526 http://assorted.svn.sourceforge.net/assorted/?rev=526&view=rev Author: yangzhang Date: 2008-02-28 19:37:17 -0800 (Thu, 28 Feb 2008) Log Message: ----------- tweak Modified Paths: -------------- sandbox/trunk/src/bash/empty-array.bash Modified: sandbox/trunk/src/bash/empty-array.bash =================================================================== --- sandbox/trunk/src/bash/empty-array.bash 2008-02-29 03:35:26 UTC (rev 525) +++ sandbox/trunk/src/bash/empty-array.bash 2008-02-29 03:37:17 UTC (rev 526) @@ -6,6 +6,10 @@ arr=1 echo "${arr[@]}" +# This works. +arr=() +echo "${#arr}" + # This fails; apparently empty arrays expanded this way are unset variables. arr=() echo "${arr[@]}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |