ÄúÏÖÔÚµÄλÖ㺠°®51´úÂëÍø >> ·¶ÎÄ >> ÎÄÕÂÕýÎÄ
awkÑ­»·¶ÁÈ¡ÎļþÐÐÄÚÈÝ£¬Èç¹û¶ÁÈ¡µ½Ö¸¶¨×Ö·ûÍ˳öshell´úÂë

#!/bin/sh
     awk '{print $0}' /data/intffile/test3.log | sed 's/€/ /g' | while read size
    do
 
        if [ $size -eq 0 ];then
            echo " Êý¾ÝµÈÓÚ0¡£ "
            exit 1
        fi
 
 
        if [ $size -gt 0 ];then
              success=1
              if [ "$success" -gt 0 ];then
                  echo "add_error 1"
                  exit 1
              fi
        fi
     done
 
echo "ΪʲôÕâ¶Î´úÂëÖ´ÐÐÁË£¿£¿"

³ÌÐòÀïʵÏÖµÄÈç¹û¶ÁÈ¡µ½0£¬Ôòexit 1  ,µ«ÊÇwhileÍâÃæµÄ  echo "ΪʲôÕâ¶Î´úÂëÖ´ÐÐÁË£¿£¿"  Ò²Ö´ÐÐÁË£¬  ÈçºÎÄܶÁÈ¡µ½0¾ÍÍ˳öµ±Ç°shell,±ðÖ´ÐÐwhileÍâÃæµÄ³ÌÐò

while read size ÊÇ¿ªÆôÁËÒ»¸öеÄshellµÄ¡£ÄãµÄexitÓï¾äÔÚ×ÓshellÖУ¨while read sizeÕâ¸öshell£©£¬Òò´ËËüÖ»ÄÜÍ˳öwhile read sizeÕâÒ»ÃüÁî¡£
ËùÒÔºóÃæµÄecho¾Í»¹»áÖ´ÐÐÁË¡£
ÀàËÆCÓïÑÔÖÐreturn¡£

shell½Å±¾ÖУ¬ÄãʹÓÃÒ»¸öÃüÁî»áÆô¶¯Ò»¸öеÄshell£¬¸ÃshellÖ´ÐÐÍ꣬Í˳ö¸Ã×Óshell£¬¶ÁÈ¡ÏÂÒ»ÐÐÃüÁÔÙ¿ªÆôÒ»¸öshell¡­¡­

  • ÉÏһƪÎÄÕ£º

  • ÏÂһƪÎÄÕ£º ûÓÐÁË
  • ×îÐÂÎÄÕ ÈȵãÎÄÕ Ïà¹ØÎÄÕÂ
    mavenÈçºÎ¼Ó×Ô¶¨ÒåµÄ°ü
    redhat 2.6 (santigo 5.6) vsftp
    shellÈçºÎʵÏÖ×Ô¶¯Ìîд²Ù×÷Ö´ÐÐÏÂ
    linux shell ÎļþÅäÖÃsh£ºcolor£º
    shell scriptÓï·¨Ò»¶¨Òª¼ÓpathÂð
    SecureCRTÈçºÎ·ÃÎÊÐéÄâ»úvmWareÖÐ
    C#ÈçºÎ¶ÁÈ¡WINDOWSµÄ·Å´óϵÊý
    cximgeµÄͼÈçºÎ´æÈëÊý¾Ý¿â²¢ÌáÈ¡
    DBGRID¿Ø¼þÏÔʾ²éѯ½á¹ûÎı¾ÀàÐÍ
    TChart¿Ø¼þÈçºÎ°Ñ±íÖÐÓұߵÄϵÁÐ
    mavenÈçºÎ¼Ó×Ô¶¨ÒåµÄ°ü
    redhat 2.6 (santigo 5.6) vsftp
    shellÈçºÎʵÏÖ×Ô¶¯Ìîд²Ù×÷Ö´ÐÐÏÂ
    linux shell ÎļþÅäÖÃsh£ºcolor£º
    shell scriptÓï·¨Ò»¶¨Òª¼ÓpathÂð
    SecureCRTÈçºÎ·ÃÎÊÐéÄâ»úvmWareÖÐ
    C#ÈçºÎ¶ÁÈ¡WINDOWSµÄ·Å´óϵÊý
    cximgeµÄͼÈçºÎ´æÈëÊý¾Ý¿â²¢ÌáÈ¡
    DBGRID¿Ø¼þÏÔʾ²éѯ½á¹ûÎı¾ÀàÐÍ
    TChart¿Ø¼þÈçºÎ°Ñ±íÖÐÓұߵÄϵÁÐ
    ½«Îļþ²åÈëµ½ÎļþµÄshell´úÂë
    pcre-config for libpcre no
    makefileÿÔËÐÐÒ»¸öÃüÁ»á
    mkdir()ÿÌ콨һ¸öÒÔÈÕÆÚλÃû
    À©Õ¹lvmʱ·ÖÅä¿Õ¼äΪ0
    error: implicit declaratio
    SMTP server problem No rou
    ÔõôÓÃsed»òawkÀ´½øÐÐÌæ»»XM
    ÈýÐÇ4412¿ª·¢°åubootÉÕд°å×Ó
    redhat 2.6 (santigo 5.6) v
     



    ÉèΪÊ×Ò³ | ¼ÓÈëÊÕ²Ø | ÍøÕ¾µØͼ | ÓÑÇéÁ´½Ó |