Bash: Making a Variable out of two other variables.
I need to find the value of:
Code:
$Namenumber I was thinking: Code:
number=$"$name"number Code:
$Namenumber How would you do this? Thank you |
I'm not sure what exactly you're asking but if you just want to join $name and $number into a single variable then:
number="$name$number" If you just want to know what $Namenumber holds then: echo "$Namenumber" Otherwise can you restate your question so it's more clear? |
I am guessing you are looking for an indirect reference, so you need one more step:
Code:
timnumber=10 |
Thankyou
The secret is eval echo. Code:
query='$'"$name"number |
Don't forget to mark as SOLVED
|
All times are GMT -5. The time now is 07:36 AM. |