![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Read the csv file and assign the values in to variable | rajbal | Shell Programming and Scripting | 11 | 06-27-2009 01:17 PM |
| Assign Values to variables from a text file | sarsani | Shell Programming and Scripting | 3 | 06-26-2009 07:05 PM |
| How to assign a variable value to array? | balamv | Shell Programming and Scripting | 2 | 06-06-2008 03:33 AM |
| how to assign multiple values in a pl/sql script | vivek_damodaran | Shell Programming and Scripting | 2 | 05-29-2008 10:09 AM |
| how do u assign the values to different variables when it is presneted in one line?? | SwetaShah | High Level Programming | 2 | 10-24-2005 09:56 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
to assign cut values to an array
i need to seperate values seperated by delimiters and assign it to an array.. can u plz help me on that.
Variables = "asd,rgbh,(,rty,got,),sroe,9034," i need to assign the variables into arrays.. like.. var[0]=asd var[1]=rgbh.. and so on how do i do this. i need to reuse the values stored in the arrays.Is it possible.. ? how do i do it using awk command? Last edited by Syms; 10-29-2007 at 06:36 AM.. |
|
||||
|
Quote:
arr[1] arr[2] Not sure what you are looking for. |
|
||||
|
hi madan .. i need to reuse the array variable outside the awk command..
echo ",asd,rgbh,(,rty,got,),sroe,9034," | awk -F"," '{ split($0, arr, ","); }END{ for ( i in arr ) { print arr[i] } }' echo " $arr[1]".. here the echo command does not give me the values stored in arr[1].. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|