您的位置:首页 > 运维架构 > Linux

Linux转化乱码

2014-04-07 11:47 411 查看

Linux转化乱码

分类: Linux2012-09-21 09:24134人阅读评论(0)收藏举报linuxjavadatepath#! /bin/bash
#
#

export JAVA_HOME=/opt/java
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export LC_All=zh_CN.gbk
export LANG=zh_CN.gbk

unset info_40001
unset info_40002
unset info_40003
unset info_40005
unset info_40006

unset info_1001
unset info_1002
unset info_1003
unset info_1004
unset info_1005
unset info_1006
unset info_1007
unset info_1008
unset info_1009
unset info_1010
unset info_1011
unset info_1012
unset info_1013
unset info_1014
unset info_1015
unset info_1016
unset info_1017
unset info_1018
unset info_1019
unset info_1020
unset info_1021
unset info_1022

FEIXIN=/opt/localhost/feixin
check_info=/opt/localhost/check_info/tmp

data_time=`date "+%Y-%m-%d %H:%M:%S"`
log_date=`date "+%Y-%m-%d"`

cd /opt/localhost/check_info/tmp
curl http://127.0.0.1/info/infofo/40001.wml > /opt/localhost/check_info/tmp/40001.wml
curl http://127.0.0.1/info/infofo/40002.wml > /opt/localhost/check_info/tmp/40002.wml
curl http://127.0.0.1/info/infofo/40003.wml > /opt/localhost/check_info/tmp/40003.wml
curl http://127.0.0.1/info/infofo/40005.wml > /opt/localhost/check_info/tmp/40005.wml
curl http://127.0.0.1/info/infofo/40006.wml > /opt/localhost/check_info/tmp/40006.wml

curl http://127.0.0.1/info/info/1001.wml > /opt/localhost/check_info/tmp/1001.wml
curl http://127.0.0.1/info/info/1002.wml > /opt/localhost/check_info/tmp/1002.wml
curl http://127.0.0.1/info/info/1003.wml > /opt/localhost/check_info/tmp/1003.wml
curl http://127.0.0.1/info/info/1004.wml > /opt/localhost/check_info/tmp/1004.wml
curl http://127.0.0.1/info/info/1005.wml > /opt/localhost/check_info/tmp/1005.wml
curl http://127.0.0.1/info/info/1006.wml > /opt/localhost/check_info/tmp/1006.wml
curl http://127.0.0.1/info/info/1007.wml > /opt/localhost/check_info/tmp/1007.wml
curl http://127.0.0.1/info/info/1008.wml > /opt/localhost/check_info/tmp/1008.wml
curl http://127.0.0.1/info/info/1009.wml > /opt/localhost/check_info/tmp/1009.wml
curl http://127.0.0.1/info/info/1010.wml > /opt/localhost/check_info/tmp/1010.wml
curl http://127.0.0.1/info/info/1011.wml > /opt/localhost/check_info/tmp/1011.wml
curl http://127.0.0.1/info/info/1012.wml > /opt/localhost/check_info/tmp/1012.wml
curl http://127.0.0.1/info/info/1013.wml > /opt/localhost/check_info/tmp/1013.wml
curl http://127.0.0.1/info/info/1014.wml > /opt/localhost/check_info/tmp/1014.wml
curl http://127.0.0.1/info/info/1015.wml > /opt/localhost/check_info/tmp/1015.wml
curl http://127.0.0.1/info/info/1016.wml > /opt/localhost/check_info/tmp/1016.wml
curl http://127.0.0.1/info/info/1017.wml > /opt/localhost/check_info/tmp/1017.wml
curl http://127.0.0.1/info/info/1018.wml > /opt/localhost/check_info/tmp/1018.wml
curl http://127.0.0.1/info/info/1019.wml > /opt/localhost/check_info/tmp/1019.wml
curl http://127.0.0.1/info/info/1020.wml > /opt/localhost/check_info/tmp/1020.wml
curl http://127.0.0.1/info/info/1021.wml > /opt/localhost/check_info/tmp/1021.wml
curl http://127.0.0.1/info/info/1022.wml > /opt/localhost/check_info/tmp/1022.wml

cd /opt/localhost/check_info/tmp
iconv -f utf-8 -t gb2312 40001.wml > /opt/localhost/check_info/tmp/40001.txt
iconv -f utf-8 -t gb2312 40002.wml > /opt/localhost/check_info/tmp/40002.txt
iconv -f utf-8 -t gb2312 40003.wml > /opt/localhost/check_info/tmp/40003.txt
iconv -f utf-8 -t gb2312 40005.wml > /opt/localhost/check_info/tmp/40005.txt
iconv -f utf-8 -t gb2312 40006.wml > /opt/localhost/check_info/tmp/40006.txt

iconv -f utf-8 -t gb2312 1001.wml > /opt/localhost/check_info/tmp/1001.txt
iconv -f utf-8 -t gb2312 1002.wml > /opt/localhost/check_info/tmp/1002.txt
iconv -f utf-8 -t gb2312 1003.wml > /opt/localhost/check_info/tmp/1003.txt
iconv -f utf-8 -t gb2312 1004.wml > /opt/localhost/check_info/tmp/1004.txt
iconv -f utf-8 -t gb2312 1005.wml > /opt/localhost/check_info/tmp/1005.txt
iconv -f utf-8 -t gb2312 1006.wml > /opt/localhost/check_info/tmp/1006.txt
iconv -f utf-8 -t gb2312 1007.wml > /opt/localhost/check_info/tmp/1007.txt
iconv -f utf-8 -t gb2312 1008.wml > /opt/localhost/check_info/tmp/1008.txt
iconv -f utf-8 -t gb2312 1009.wml > /opt/localhost/check_info/tmp/1009.txt
iconv -f utf-8 -t gb2312 1010.wml > /opt/localhost/check_info/tmp/1010.txt
iconv -f utf-8 -t gb2312 1011.wml > /opt/localhost/check_info/tmp/1011.txt
iconv -f utf-8 -t gb2312 1012.wml > /opt/localhost/check_info/tmp/1012.txt
iconv -f utf-8 -t gb2312 1013.wml > /opt/localhost/check_info/tmp/1013.txt
iconv -f utf-8 -t gb2312 1014.wml > /opt/localhost/check_info/tmp/1014.txt
iconv -f utf-8 -t gb2312 1015.wml > /opt/localhost/check_info/tmp/1015.txt
iconv -f utf-8 -t gb2312 1016.wml > /opt/localhost/check_info/tmp/1016.txt
iconv -f utf-8 -t gb2312 1017.wml > /opt/localhost/check_info/tmp/1017.txt
iconv -f utf-8 -t gb2312 1018.wml > /opt/localhost/check_info/tmp/1018.txt
iconv -f utf-8 -t gb2312 1019.wml > /opt/localhost/check_info/tmp/1019.txt
iconv -f utf-8 -t gb2312 1020.wml > /opt/localhost/check_info/tmp/1020.txt
iconv -f utf-8 -t gb2312 1021.wml > /opt/localhost/check_info/tmp/1021.txt
iconv -f utf-8 -t gb2312 1022.wml > /opt/localhost/check_info/tmp/1022.txt

cd /opt/localhost/check_info/tmp/
info_40001=`grep "<card title=" 40001.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_40002=`grep "<card title=" 40002.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_40003=`grep "<card title=" 40003.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_40005=`grep "<card title=" 40005.txt |awk -F "=" '{print $2}'|cut -c 3-20`
info_40006=`grep "<card title=" 40006.txt |awk -F "=" '{print $2}'|cut -c 3-18`

info_1001=`grep "<card title=" 1001.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1002=`grep "<card title=" 1002.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1003=`grep "<card title=" 1003.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1004=`grep "<card title=" 1004.txt |awk -F "=" '{print $2}'|cut -c 3-20`
info_1005=`grep "<card title=" 1005.txt |awk -F "=" '{print $2}'|cut -c 3-20`
info_1006=`grep "<card title=" 1006.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1007=`grep "<card title=" 1007.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1008=`grep "<card title=" 1008.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1009=`grep "<card title=" 1009.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1010=`grep "<card title=" 1010.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1011=`grep "<card title=" 1011.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1012=`grep "<card title=" 1012.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1013=`grep "<card title=" 1013.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1014=`grep "<card title=" 1014.txt |awk -F "=" '{print $2}'|cut -c 3-19`
info_1015=`grep "<card title=" 1015.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1016=`grep "<card title=" 1016.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1017=`grep "<card title=" 1017.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1018=`grep "<card title=" 1018.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1019=`grep "<card title=" 1019.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1020=`grep "<card title=" 1020.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1021=`grep "<card title=" 1021.txt |awk -F "=" '{print $2}'|cut -c 3-18`
info_1022=`grep "<card title=" 1022.txt |awk -F "=" '{print $2}'|cut -c 3-18`

echo "你好:"
echo " 每日更新情况报告."
echo " 检查时间" $data_time
echo ""
echo " 板块名称-"
echo " "$info_40001
echo " "$info_40002
echo " "$info_40003
echo " "$info_40005
echo " "$info_40006
echo ""
echo " 板块名称"
echo " "$info_1001
echo " "$info_1002
echo " "$info_1003
echo " "$info_1004
echo " "$info_1005
echo " "$info_1006
echo " "$info_1007
echo " "$info_1008
echo " "$info_1009
echo " "$info_1010
echo " "$info_1011
echo " "$info_1012
echo " "$info_1013
echo " "$info_1014
echo " "$info_1015
echo " "$info_1016
echo " "$info_1017
echo " "$info_1018
echo " "$info_1019
echo " "$info_1020
echo " "$info_1021
echo " "$info_1022
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux转化乱码