how to do that!

i have a file calld dir.list, it is looking like that:
@/cav
@/mnt
@/syscat/bar
/tts
/usr/cach
/bar

what i want is to write a script that will chack to see if the line begin with the @, then it should add $x to tne name without the @, like
@/cav will result in /xxxxxxx/cav......
and lines that all ready have the / signe, not to do nothing.

thanks

Try...

awk -v x="/xxxxxxx" '{sub(/^@/,x); print}' dir.list

str="/xxxxxxx"
sed "s%^@%$str%" file