Updated Getting Started with OpenShift

2017-05-05 Thread Neale Ferguson
For your weekend reading please I have updated the Getting Started with 
OpenShift on z “Red Piece” with new sections including running Spark, Hadoop, 
and Zeppelin.

http://download.sinenomine.net/clefos-yum-repo/epel7/Getting_Started_with_OpenShift_on_z.pdf

Neale

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu 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/


Re: Bash loop failing

2017-05-05 Thread Ted Rodriguez-Bell
If I could make a small suggestion, if you don't need the indices you may find 
loops easier to read without them:

FILE=($(ls))
for F in ${FILE[@]}
do
echo "$F"
done

I'll give out the caution that if you use "set -u" in your scripts (and you 
should!), there can be some really, um, interesting interactions between that 
and ${FILE[@]}. In an empty directory the above with -u throws an error in 
bash, but not in ksh. Using the indices as Neale does is safe in bash even when 
FILE is empty.

Ted Rodriguez-Bell
te...@wellsfargo.com, 415-222-4516
z/VM and Linux on IBM z Systems
Mainframe/Midrange Services (MMS), Enterprise Technology Infrastructure (ETI)


On Thu, 2017-05-04 at 14:40 +, Neale Ferguson wrote:

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 lists...@vm.marist.edu 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/