3 Replies Latest reply on Feb 25, 2011 3:00 PM by Jeff Orndorff

    NSH array variables

      The following script example works as expected in a bash shell, but when executed when using nsh as the shell it errors with "no matches found: network[0]".

       

      Example:

       

      i=0

      while read network[${i}] mask[${i}] zone[${i}]

               do

               echo ${network[$i]}

               i=`expr $i + 1`

      done << __EOF__

      1.1.1.1 8 zone1

      2.1.1.1 16 zone2

      3.1.1.1 24 zone3

      4.1.1.1 24 zone4

      __EOF__

       

      Could anyone point me towards documentation regarding variable usage with NSH (particularly array usage and substring extraction)?

       

      Thanks in advance.