I would like to write a small script copying from a directory A to directory B all the files with the .log extension.So in my directory A, I've : ls : a.logb.logc.logHere is the pseudo-code I would like to implement : foreach *.log x do :    if [stat -c %s pk_copylogs < 10485760]; then           cp  A/x  B/x           else          read vANSWER? >> File x is bigger than 10 MB, would you like to copy it anyway ? Type YES or NO :           if [ $vANSWER = YES]; then              cp A/x B/x          fi    fiMy main problem here, is to find a way to implement my foreach *.log. How can I do that ? 
KSH : cp only based on file size
ksh;cp;size