![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| saving awk value in a bash array variable | npatwardhan | Shell Programming and Scripting | 1 | 12-17-2008 09:46 PM |
| Compare array values | shantanuo | UNIX for Dummies Questions & Answers | 2 | 10-21-2008 05:41 AM |
| incorrect array values | jhillier | UNIX for Dummies Questions & Answers | 6 | 01-04-2008 04:44 AM |
| to assign cut values to an array | Syms | UNIX for Dummies Questions & Answers | 6 | 10-29-2007 06:42 AM |
| how do I store the values in array using shell | krishna | UNIX for Advanced & Expert Users | 2 | 08-17-2001 09:49 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
saving values from awk expression into shell array
hi i am trying to save the values i extract from a file with the help of awk in a bash shell array.
i have: Code:
exec 10<file2
while read LINE <&10; do
ARRAY1[$count]=$(awk '{print $1}' file2)
((count++))
done
echo ${ARRAY1[@]}
this is not working.. any ideas what is wrong here? thanks |
|
||||
|
thanks. i used the following:
Code:
ARRAY1=( cut -d ',' -f1 file1 ) Code:
1,5 2,9 3,8 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|