From: Bill Verzal (BVerzal@KOMATSUNA.COM)
Date: Wed Jul 02 2003 - 11:15:45 EDT
count=0
for i in 345trh hur88 kjsdhf eryyt9 333ret
do
count=`expr $count + 1`
a[$count]="$i"
done
Reference them with a[${1}] through end of list.
BV
--------------------------------------------------------
Bill Verzal
AIX Administrator, Komatsu America
(847) 970-3726 - direct
(847) 970-4184 - fax
|---------+---------------------------->
| | Ranbir Singh |
| | <Singh@XAVIER.EDU|
| | > |
| | Sent by: IBM AIX |
| | Discussion List |
| | <aix-l@Princeton.|
| | EDU> |
| | |
| | |
| | 07/02/2003 10:01 |
| | AM |
| | Please respond to|
| | IBM AIX |
| | Discussion List |
| | |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
| |
| To: aix-l@Princeton.EDU |
| cc: |
| Subject: Korn Shell Q |
>-------------------------------------------------------------------------------------------------------------------------------|
Hello,
Quick, simple korn shell question:
I have the result of grep and cut commands that shows multiple lines. For
example:
345trh
hur88
kjsdhf
eryyt9
333ret
How can I divide these lines to feed into variables? That is, each of the
above lines needs to be assigned to a variable.
Thanks
--------------------------------
"Colorless green ideas sleep furiously."
--------------------------------
Ranbir Singh
System Administrator
Xavier University
Cincinnati, Ohio
O: 513.745.3889
E: singh@xavier.edu
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:59 EDT