![]() |
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 |
| Shell script that reads from configuration file to get database | dolo21taf | Shell Programming and Scripting | 1 | 04-15-2008 07:47 PM |
| Shell script to read file into variable | aspect_p | Shell Programming and Scripting | 7 | 03-21-2008 12:12 PM |
| Read variable from file in a C shell script | haouesse | Shell Programming and Scripting | 2 | 11-07-2006 09:34 AM |
| Shell Script to read specific lines in a file | varshanswamy | Shell Programming and Scripting | 5 | 08-22-2005 07:12 PM |
| script to read configuration file | philip_dba | Shell Programming and Scripting | 1 | 04-05-2004 09:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
The config file looks like below:
# This is the properties file which has the Hostaddress,instancecount,username and the password HOST_ADDRESS = 180.144.226.47,180.144.226.35 USERNAME = pwdfre,kjhy PASSWORD = hgfre,loiuy INSTANCE_COUNT = 3,8 The individual entries i have to store in an array and then do operations on that. |
|
||||
|
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 You can use them,to list all the values contained in the array use ${HOST_ADDRESS[*]} format Thanks Nagarajan G |
|
||||
|
how to store key value pairs(hash)in shell scripting
Please let me know how to store key value pairs and sort the keys of hash in shell scripting.
|
| Sponsored Links | ||
|
|