我想在几个档案上 a。 我有档案名称和查阅档案的途径,但我似乎无法把这两者联系起来。 我在此试图:
files=(a b c)
directory=/my/dir
awk $my_script "$directory/${files[@]}"
It awks the first file and leaves the rest alone. I d rather not have to add the full path in my array (the values are used in several places). I think I want brace expansion, but it doesn t seem to work with arrays. What else could I do?