im writing some bash exercises, this in particular wants to check all the files named file-a(sonenumber) and move it to directory named dirA But there's some problem with for loop i can do that without for loop just simply writing
mv $(ls -la | awk '$9 - /-a[0-9]+/ {print $9}') dirA
but i wanna do it with a for and i cant do that there's the script
FILES=(ls -la | awk '$9 - /-a[0-9]+/ {print $9}')
for arg in "$FILES"
do
mv $arg dirA
done