![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi-Dimensional Arrays | Octal | High Level Programming | 3 | 04-08-2007 04:58 AM |
| borne shell script | migg-21 | UNIX for Dummies Questions & Answers | 1 | 02-26-2007 12:54 AM |
| Documenattion on Borne And C shell programming | azazalis | Shell Programming and Scripting | 3 | 07-09-2006 10:56 AM |
| Need Help With My First Borne Shell Program | FuzzyNips | UNIX for Dummies Questions & Answers | 3 | 11-04-2004 07:09 PM |
| duble dimensional arry in shell script | krishna | UNIX for Advanced & Expert Users | 1 | 09-07-2001 10:54 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello -
I've serached the web but can't find much on array script variables (except that C-shell variables are arrays!) I'm trying to form a 2-D string array: (this is what I want, but in java) String[][] list = { {"one", "two"}, {"three"} }; I know this is a 1-D string array shell variable: list="one two" but how can I get another dimension? (and then index them in borne shell?) (I acknowledge that it might not be possible) Basically I'd like to have a single variable, it's first set of elements always get evaluated, and if a 2nd dimension exists, apply slightly different logic on all of the other elements. Any ideas would be greatly appreciated. Thanks, Sean Last edited by jparker; 05-16-2002 at 09:43 AM.. |
|
||||
|
I'm afraid you might have to build such array through logic, at least in Korn Shell (ksh).
As you mentionned, here's what's truly available: # Arrays : one dimensional arrays of integers or strings # automatically dimensionned to 1024 animal[0]="dog" ; animal[1]="horse" ; animal[3]="donkey" set -A flower tulip gardenia " " rose print ${animal[*]} print ${flower[@]} print "cell#1 content : ${flower[1]} |
![]() |
| Bookmarks |
| Tags |
| bash, bash eval, eval |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|