Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1177057
  • 博文数量: 573
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 66
  • 用 户 组: 普通用户
  • 注册时间: 2016-06-28 16:21
文章分类

全部博文(573)

文章存档

2018年(3)

2016年(48)

2015年(522)

分类: LINUX

2015-12-02 20:27:43


点击(此处)折叠或打开

  1. #!/bin/bsh

  2. export logfile=${HOME}/log/qhsock.`date +"%Y%m%d%H%M%S"`.log

  3. TMPPORT=`dbaccess - - <<! 2>>${logfile}
  4.     database $DATABASE;
  5.     select trim(chnl_code),trim(class_code),trim(serv_port),trim(tux_service),flag_set[2],msglen_width,timeout from c_member_ip where chnl_code='CQJS';
  6.     close database;
  7. !`

  8. ##echo $TMPPORT >> ${logfile}

  9. count=1
  10. for Tpara in $TMPPORT
  11. do
  12.     exc=`expr $count % 14`
  13.     if [ $exc -eq 0 ]
  14.     then
  15.         para=$para" "$Tpara
  16.         echo $para |awk '{print "qhsock " $2 " " $4 " " $6 " " $8 " " $10 " " $12 " " $14}' >>$logfile 2>&1
  17.         echo $para |awk '{cmd="qhsock " $2 " " $4 " " $6 " " $8 " " $10 " " $12 " " $14 ">>$logfile 2>&1";system(cmd)}'
  18.         para=""
  19.     else
  20.         para=$para" "$Tpara
  21.     fi

  22.     count=`expr $count + 1`
  23. done

阅读(377) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~