Does csh have pointer?

180 Views Asked by At

Im using csh (c-shell) and I dont know that if csh support pointer? for example:

set a = 1
set b = a
echo $($b)
=> 1

I mean $($b) => $a (replace $b by a)

Could you help me?

1

There are 1 best solutions below

0
On
#!/bin/csh
set a=1
set b=a
eval echo \$$b

so the $ will dereference $b to a to give 1