Re: Combining variables

From: Bob.Kelley@BRINKSINC.COM
Date: Thu Mar 18 2004 - 10:32:31 EST


two ways:

export test=test
export this=this
echo ${test}${this}
testthis
echo $test$this
testthis

Bobby Kelley Jr.
972-877-5341

|---------+---------------------------->
| | Raj Atwal |
| | <atwalrs@YAHOO.CO|
| | M> |
| | Sent by: IBM AIX |
| | Discussion List |
| | <aix-l@Princeton.|
| | EDU> |
| | |
| | |
| | 03/18/2004 09:19 |
| | AM |
| | Please respond to|
| | IBM AIX |
| | Discussion List |
| | |
|---------+---------------------------->
>------------------------------------------------------------------------------------------------------------------------------|
  | |
  | To: aix-l@Princeton.EDU |
  | cc: |
  | Subject: Combining variables |
>------------------------------------------------------------------------------------------------------------------------------|

PARM10=hello
AZ=10

If I have the above in a script and I want to echo the value of my
parameter PARM10, how would I do that by combining my AZ parameter. For
instance I want to be able to do

echo $PARM$AZ

and have it echo the value of PARM10 to say hello. I can't figure how to
quote it to expand $PARM10.

TIA

Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam

NOTICE TO BRINK'S EMPLOYEES:
All electronic mail communications composed, sent, received or stored on or
through Brink's equipment are subject to the Brink's Electronic
Communications Policy. Employees should have no expectation of privacy in
their use of the Company's electronic mail system.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:43 EDT