KSH Arrays

463 views

Published on

How to iimplement arrays in kornshell

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
463
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

KSH Arrays

  1. 1. Basic structure for KSH with ARRAYs. ######EOF###### #!/bin/ksh +-------------------------------------------------- | |Description : Default KSH-ARRAY |Author : Marcos de Benedicto |Date : 08/02/2013 |Version : 1.0 | +-------------------------------------------------- Define KSH ARRAY, name and set -A ARRAY main ind_1 vector main() { RC=$1 MSG=$2 This vector is a return code control and centralize exit [ ${RC} -eq 0 ] && echo "Exec Ok!" || echo "Exec Not OK!" command. exit ${RC} } ind_1() {Program execution and return PROGRAM EXEC code identification. ${ARRAY[0]} $? } ${ARRAY[1]} ######EOF###### Start ARRAY, call vector 1.

×