# more PMFileCreat.sh #!/bin/bash today=$(date '+%Y%m%d') mkdir /opt/$today #ls -lrt /opt/dayFiles/PM*|tail -6|awk '{print $9}'|xargs -i cp {} ./$today/ cd /opt/dayFiles/ ls -lrt PM*|tail -6|awk '{print $9}'|xargs -i cp {} /opt/$today/
# more PMFileCreat.sh #!/bin/bash today=$(date '+%Y%m%d') mkdir /opt/$today #ls -lrt /opt/dayFiles/PM*|tail -6|awk '{print $9}'|xargs -i cp {} ./$today/ cd /opt/dayFiles/ ls -lrt PM*|tail -6|awk '{print $9}'|xargs -i cp {} /opt/$today/