I would like to write a small script copying from a directory A to directory B all the files with the
So in my directory A, I've :
ls : a.log b.log c.log
Here 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 fi
My main problem here, is to find a way to implement my
foreach *.log. How can I do that ?