#/bin/bash
YUAMFILE=$1
MUDIFILE=/server/shiyan/mudi.txt
AWKFILE=/server/shiyan/awk.txt
dos2unix $YUAMFILE
. /etc/init.d/functions
>$MUDIFILE
for n in `grep -o "[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]" $YUAMFILE`
do
MD5=`echo -n $n|md5sum`
echo "${n} ${MD5}" >> $MUDIFILE
if [ $? -eq 0 ]
then
action " $n md5 " /bin/true
else
action "$n md5" /bin/false
exit 1
fi
done
sleep 3
>$AWKFILE
awk -F"[ ]+" ‘{print $2}‘ $MUDIFILE >>$AWKFILE
if [ $? -eq 0 ]
then
clear
action " AWK IS OK " /bin/true
else
action "AWK NOT OK" /bin/false
exit 1
fi
时间: 2024-10-29 03:49:52