#!/bin/sh
find boss_file/ -name "?ABCD????????????.???" |
while read BOSS_FILE
do
echo "BOSS FILE NAME: $BOSS_FILE"
BOSS_EXPORT_TIME=`head -1 "$BOSS_FILE" | awk -F ',' '{print $2}'`
echo "BOSS FILE EXPORT TIME: $BOSS_EXPORT_TIME"
cat $BOSS_FILE | while read BOSS_FILE_LINE
do
if expr "$BOSS_FILE_LINE" : 'H,' > /dev/null || expr "$BOSS_FILE_LINE" : 'T,' > /dev/null ; then
echo "$BOSS_FILE_LINE" >> JJCS_BOSS_SYNC_FILE_BAD.DAT
else
echo "$BOSS_FILE_LINE" | replace ",/r" ",,$BOSS_EXPORT_TIME" >> JJCS_BOSS_SYNC_FILE.DAT
fi
done
done
shell 操作文件示例
最新推荐文章于 2024-08-27 21:48:47 发布