Receiving 'ambiguous redirect' when trying to run command against multiple files

I came across the command string

on http://www.unix.com/shell-programming-scripting/141885-awk-removing-data-before-after-pattern.html which was what I was looking for to be able to remove data before a certain pattern. However, outputting the result to a file seems to work on an individual basis (sed -n '/^ISA/,$p' < testa > testa_mod) while trying to do it on multiple files at once results in an ambiguous redirect:
for a in $(ls test*); do sed -n '/^ISA/,$p' $a > $a_mod; done
-bash: $a_mod: ambiguous redirect

Thoughts?

Pearhaps :

for a in $(ls test*); do sed -n '/^ISA/,$p' $a > ${a}_mod; done

Jean-Pierre.

Thanks so much, Jean-Pierre!!! Just wondering, what exactly does the parentheses surrounding the variable do?

Parentheses function as backticks, essentially, but here they do nothing useful at all -- they're a wasteful no-op that expands the filenames, puts them into ls, then gets them right back out, re-expands the expanded expansion, then feeds them into a one by one. You could write for a in test* for the same effect with more efficiency.

If you meant the ${a}, it's there to prevent it from taking $a_mod to be the entire variable name.

I misinterpreted the brackets as parentheses (although the command worked despite not using the brackets) - oops! Thanks so much for the explanation!