Summary: array in ksh

From: Zaigui Wang <>
Date: Wed Aug 06 2003 - 18:07:39 EDT
I was able to get what I want by way of changing the
IFS environment variable to a newline. This is how I
do it:

#> IFS='^J'
#> set -A array `ps -u root`

You may want to save the IFS value before you change
it so that it can be swapped back, if needed. Thanks
to Crist Clark for providing this hint.

My thanks also go to the following:
Mark Scarborough
John Julian
Ilhan Narili

Some suggested that I use perl. Perl is bit overkill
for what I am trying to achieve though. others
suggested that double-quoting the command worked for
them, but somehow I was not able to re-produce that.

Thanks you all for helping.


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
sunmanagers mailing list
Received on Wed Aug 6 18:11:15 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:17 EST