Assume we have a variable 'a' set to 12345 :
set a 12345
Now how do i set a new variable 'b' which contains the value of 'a' and another string say 9876
workaround is something like
set a "12345"
set u "9876"
set b $a$u
but i dont want to specify $u
instead i want the direct string to used..
You can do:
set b ${a}9876
or, assuming b
is either set to the empty string or not defined:
append b $a 9876
The call to append
is more efficient when $a
is long (see append
doc).