![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comparing values of same variable | coolkid | Shell Programming and Scripting | 2 | 05-27-2008 06:45 PM |
| getting values from variable in a loop | kriuz | Shell Programming and Scripting | 3 | 01-22-2008 05:50 PM |
| assigning values to a variable | trichyselva | UNIX for Dummies Questions & Answers | 3 | 12-14-2007 01:55 AM |
| Dynamic Variable Declatation | Cameron | Shell Programming and Scripting | 2 | 09-26-2007 12:59 PM |
| Substitute variable values | John Rihn | Shell Programming and Scripting | 12 | 03-15-2006 10:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Dynamic variable values
Bit of a newbie
with regard to unix scripting and need some advice. Hopefully someone can help with the following:I have a predefined set of variables as follows: AAA_IP_ADD=1.1.1.1 BBB_IP_ADD=2.2.2.2 I have a funnction call which retrieves a value into $SUPPLIER which would be used as a prefix to obtain the IP address for a specific SUPPLIER. The function works and returns me a value but for explanation purposes it could be defined as follows: $SUPPLIER=BBB I need to now retreive the value from AAA_IP_ADD or BBB_IP_ADD based on the setting for $SUPPLIER. So I concatenate '_IP_ADD' onto $SUPPLIER. To try and make sense of it here is what I am trying to run: echo $SUPPLIER'_IP_ADD' This returns a literal value and not the value stored in AAA_IP_ADD or BBB_IP_ADD Can anyone advise how I get the actual value for these variables. Thanks Last edited by ronnie_uk; 07-11-2008 at 08:43 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|