Je ne sais pas ce que tu veux faire.
L'entité
$[$fichier] est une expression arithmétique (évalua tion du contenu de la variable fichier)
exemple
johand@horus:~$ fichier=packages-2005-05-10
johand@horus:~$ echo $[$fichier]
-2020
johand@horus:~$ fichier=packages-2005-05-10.txt
johand@horus:~$ echo $[$fichier]
bash: packages-2005-05-10.txt: syntax error in expression (error token is ".txt")
Extrait de man bash
Arithmetic expansion allows the evaluation of an arithmetic expression and the substitution of the result. The format for arithmetic expansion is:
$((expression))
The old format $[expression] is deprecated and will be removed in upcoming versions of bash.
Essaye de préciser le but de ta manip...
Johan


