The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 01-29-2008
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
Try this,
Code:
sed -e '1i#!/bin/ksh' -e 's/,/ /g' -e 's/=//g' -e 's/\(.*\)/set -A \1/' /tmp/yourInput > /tmp/array_config.ksh
The above will create a ksh script with arrays.

You can use them,to list all the values contained in the array use ${HOST_ADDRESS[*]} format

Thanks
Nagarajan G