I have a dir with files : X, A_1, A_2, A_3, etc.. I want to append X to A_1, A_2,A_3,.. and write to A_1,A_2,A_3,... That is : cat X >> A_1, cat X >> A2, cat X >> A3
When I do
cat X >> A_*
I get
-bash: A_*: ambiguous redirect
What am I doing wrong here ?
While that would work in zsh with the
multios
option set, bash doesn't allow you to specify more than one redirect target per stream. You could do this with a loop, but your best option is to usetee
.