代码拉取完成,页面将自动刷新
#!/bin/bash
DIRSORT="/lasa/usr/COMNC/STARX/LOTESORT"
DIRTEMP="${DIRSORT}/TEMP"
LOTETMP=$(ls ${DIRSORT}/TEMP/T_lote* 2>/dev/null |wc -l)
conta_arquivos() {
quantidade_arquivos=$(find ${DIRTEMP} -maxdepth 1 -type f -name "T_lote*.${data_temp}.*" 2>/dev/null |wc -l)
}
if [ $# -eq 1 -a $1 == "-a" ]; then
find ${DIRTEMP} -maxdepth 1 -type f -name "T_lote*" -exec mv {} ${DIRSORT} \; 2>/dev/null
elif [ $# -eq 0 ]; then
if [ ! -d ${DIRTEMP} -o ${LOTETMP} -eq 0 ]; then
pusopo14 "Nenhum arquivo para restaurar - tecle <ENTRA> para continuar"
exit 0
fi
trap "" 2 3 15
set -ah
set +fu
tput cup 2 0
. pusopg04 $DIAL/TUSOPO032
tput clear
tput cup 2 0
case ${data_temp} in
[0-9][0-9][0-9][0-9][0-9][0-9])
conta_arquivos
if [ ${quantidade_arquivos} -gt 0 ]; then
find ${DIRTEMP} -maxdepth 1 -type f -name "T_lote*.${data_temp}.*" -exec mv {} ${DIRSORT} \; 2>/dev/null
EXIT=$?
if [ ${EXIT} -eq 0 ]; then
pusopo14 "${data_temp}: ${quantidade_arquivos} arquivos restaurados\nTecle <ENTRA> para continuar"
else
pusopo14 "Erro ${EXIT} - tecle <ENTRA> para continuar"
fi
else
pusopo14 "Nenhum arquivo com esta data - tecle <ENTRA> para continuar"
exit 0
fi
;;
*)
pusopo14 "Informe a data no formato AAMMDD - tecle <ENTRA> para continuar"
exit 0
;;
esac
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。