![]() |
|
|
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 |
| bash array passed to oracle | satnamx | Shell Programming and Scripting | 1 | 11-28-2008 12:37 PM |
| [BASH - KSH] Passing array to a function | ripat | Shell Programming and Scripting | 3 | 04-17-2008 09:17 AM |
| bash:awk output into an array | phamp008 | Shell Programming and Scripting | 2 | 03-16-2008 05:14 AM |
| bash array | gubten | Shell Programming and Scripting | 1 | 12-08-2006 04:47 PM |
| How can i read array elements dynamically in bash? | haisubbu | UNIX for Dummies Questions & Answers | 1 | 08-29-2006 03:19 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
bash array problem
hi friends.,
i have two files yy.dat and mm.dat containing 110 elements in each if i read them into variables it is just showing only 4 elements instead of 110 elements My script is like this ################################## /bin/bash declare -a yy=(`cat yy.dat`) echo "No of values in yy array: ${#yy}" yynum=${#yy} declare -a MM=(`cat mm.dat`) echo "No of values in MM array: ${#MM}" for ((i=0;i<$yynum;i++)); do date2jd ${MM[${i}]} ${yy[${i}]} >> ans.dat echo >> ans.dat done echo "results written in ans.dat" ###################################### if i run this in command line [yagnesh@aces00 sst]$ ./d2jd.sh No of values in yy array: 4 No of values in MM array: 4 results written in ans.dat in yy and MM arrays only four values are loaded.. any clues where i did wrong........ thanks in advance |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|