D'ou l'importance du nom des variable alors :)
j'aurais nomme ta variable $fichier -> $var_fichier
mettons que $fichier contient "/home/toi/ton_fichier"
$var_fichier contient "fichier"
en gros, tu voudrais que
cat $var_fichier <=> cat $fichier <=> cat /home/toi/ton_fichier
C'est bien ça ?
Dans ce cas, je ne connais pas cette possibilitée dans bash, mais on ne sais jamais, je cherchais a faire la même chose a peu prés en php, et j'ai fini par tomber dessus
En attendant tu peux toujour te créer un fichier temporaire
mettons que tes variable d'environnement soient:
fichier=/mon_fichier
var_fichier=fichier
Ton script pourrait commencer par:
cat >tmp<<EOF
a=\$$var_fichier
EOF
source tmp && rm tmp
cat $a #doit afficher $fichier
A tester :)


