![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [BASH - KSH] Passing array to a function | ripat | Shell Programming and Scripting | 3 | 04-17-2008 05:17 AM |
| output of an array | ragha81 | Shell Programming and Scripting | 3 | 03-22-2007 12:30 PM |
| bash array | gubten | Shell Programming and Scripting | 1 | 12-08-2006 12:47 PM |
| How can i read array elements dynamically in bash? | haisubbu | UNIX for Dummies Questions & Answers | 1 | 08-28-2006 11:19 PM |
| bash array passed to oracle | satnamx | Shell Programming and Scripting | 0 | 04-09-2006 04:01 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
bash:awk output into an array
Hi,
I have a file 1:apple orange:one 2:banana:two 3:cherry:3 When I do awk -F: ' { print $2 } ' file apple orange banana cherry Now, when i redirect awk output to the file it has issue with strings #!/bin/bash FILEA=file A=(`awk -F: ' { print $2 } ' $FILEA `) echo ${A[0]} It gives the output apple banana cherry Somehow, I lost orange along the way. Thanks Last edited by zazzybob; 03-14-2008 at 04:19 AM. Reason: Smilies disabled. |
| Forum Sponsor | ||
|
|