for j in * .* ; do     cp $j ../$name-S$i.gid/${j%%. * }$i.${j#*.}doneCould someone tell me what this for loop does?  What do *, % and # mean? ($name is a path of a directory in which there are -S1.gid ... -Sn.gid directory)
Expansion of *,#,% - What do they mean?
bash;shell;shell script;regular expression