Dear Neale,

I believe you are on to something here.  I have used the BASH string
arrays and they really rock.

As you likely know, I shall be giving a presentation on something I call
"Visual Bash", At the VM Workshop next month.  Visual Bash is a framework
to help make bash programs easier to manage.

Consequently, my interest is not merely academic, I am really interested
in bash code under zLinux.

Right now the most difficult thing I am grappling with is the Marist
listserver does not like me.  I am testing this messasge to see if it gets
through.

Regards,

Flint

On Thu, 4 May 2017, Neale Ferguson wrote:

Date: Thu, 4 May 2017 14:40:42 +0000
From: Neale Ferguson <[email protected]>
Reply-To: Linux on 390 Port <[email protected]>
To: [email protected]
Subject: Re: Bash loop failing

Rather than using read can you load the results of the command into an array 
and iterate:


FILES=`ls`

FILE=(${FILES})

for ((i=0; i<${#FILE[@]}; i++))

do

  echo ${i} ${FILE[$i]}

  done

Exit


This should load the variables before the other scripts are invoked.


Neale

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to