![]() |
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 |
| Perl Function Array Arguement Passing | Raynon | Shell Programming and Scripting | 5 | 03-27-2009 01:29 PM |
| Passing a file handler and an array from Perl to Shell Script | pinkgladiator | Shell Programming and Scripting | 5 | 11-17-2008 11:00 PM |
| Passing by value a char array | rkraj | High Level Programming | 5 | 08-12-2008 10:30 AM |
| [BASH - KSH] Passing array to a function | ripat | Shell Programming and Scripting | 3 | 04-17-2008 08:17 AM |
| Help in passing array of inputs to C program using script? | ahjiefreak | Shell Programming and Scripting | 1 | 03-20-2008 07:36 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
passing line into array
I am doing a shell script in ksh. I have an output from grep that goes something like this:
wordIWasLookingFor anotherWordIWasLookingFor yetAnotherWordIWasLookingFor I want to toss each line into an array such that: myArray[0] = wordIWasLookingFor myArray[1] = anotherWordIWasLookingFor myArray[2] = yetAnotherWordIWasLookingFor Can anyone tell me how to do this? I was thinking along the lines of: Code:
myArray[]=`grep LookingFor myFile.txt` Thanks for all answers in advance. |
|
||||
|
this has been answered by vgersh99
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|