how do i do this?
if $(v1)='x' then
is it possible?
You are almost there, just don't expand the variable
set v1='x'; if v1 ='x' then set v2='y';end if
Hope that helps.
Or, expand the variable but surround it with quotes:
if '$(v1)' = 'x' then
just to understand, in general what is the difference between writing $(v1) and v1 ?
Check this post about variables, expansion and evaluation.
Retrieving data ...