BASH variable referencing
Hi all
Another no brainer(I must have left mine at home today). I'm sure I have done this before but I can't figure it out.
This is also very similar to one of my previous posts about indirect referencing, but slightly different.
I want to set a varaible such that it updates it's value with reference to another variable. Much like aliasing can do with single quotes.
e.g.
>bar=test
>foo=$bar
>echo $foo
>test
>bar=test1
>echo $foo
>test1
Indirect referencing isn't quite what I want for this, but I'm sure there is something very obvious that I've missed.
Thanks
Nath
|