{"id":10684,"date":"2025-04-18T18:08:03","date_gmt":"2025-04-18T10:08:03","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/10684.html"},"modified":"2025-04-18T18:08:03","modified_gmt":"2025-04-18T10:08:03","slug":"shell%e8%84%9a%e6%9c%ac-%e6%b5%81%e7%a8%8b%e6%8e%a7%e5%88%b6-while%e5%be%aa%e7%8e%af","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/10684.html","title":{"rendered":"shell\u811a\u672c--\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af"},"content":{"rendered":"<p>while\u5728shell\u4e2d\u4e5f\u662f\u8d1f\u8d23\u5faa\u73af\u7684\u8bed\u53e5&#xff0c;\u548cfor\u4e00\u6837\u3002\u56e0\u4e3a\u529f\u80fd\u4e00\u6837&#xff0c;\u5f88\u591a\u4eba\u5728\u5b66\u4e60\u548c\u5de5\u4f5c\u4e2d\u7684\u811a\u672c\u9047\u5230\u5faa\u73af\u5230\u5e95\u8be5\u4f7f\u7528for\u8fd8\u662fwhile\u5462&#xff1f;\u5f88\u591a\u4eba\u4e0d\u77e5\u9053&#xff0c;\u5c31\u9020\u5c31\u4e86\u6709\u4eba\u4e00\u9047\u5230\u5faa\u73af\u5c31\u662ffor\u6216\u8005\u4e00\u4f4d\u7684while\u3002\u6211\u4e2a\u4eba\u8ba4\u4e3a\u53ef\u4ee5\u6309\u7167\u6211\u8bf4\u7684\u8fd9\u4e2a\u601d\u60f3\u6765\u4f7f\u7528&#xff0c;\u65e2\u77e5\u9053\u5faa\u73af\u6b21\u6570\u5c31\u53ef\u4ee5\u7528for&#xff0c;\u6bd4\u5982\u8bf4\u4e00\u5929\u9700\u8981\u5faa\u73af24\u6b21&#xff1b;\u5982\u679c\u4e0d\u77e5\u9053\u4ee3\u7801\u8981\u5faa\u73af\u591a\u5c11\u6b21&#xff0c;\u90a3\u5c31\u7528while&#xff0c;\u6bd4\u5982\u6211\u4eec\u4f5c\u4e1a\u4e2d\u8981\u6c42\u5199\u7684\u731c\u6570\u5b57&#xff0c;\u6bcf\u4e2a\u4eba\u731c\u5bf9\u4e00\u4e2a\u6570\u5b57\u7684\u6b21\u6570\u90fd\u662f\u4e0d\u80fd\u56fa\u5b9a\u7684&#xff0c;\u4e5f\u662f\u672a\u77e5\u7684\u3002\u6240\u4ee5\u8fd9\u6837\u7684\u5faa\u73af\u6211\u5c31\u5efa\u8bae\u5927\u5bb6\u7528while\u4e86\u3002<\/p>\n<h3>\u4e00\u3001while\u4ecb\u7ecd<\/h3>\n<p>\u7279\u70b9&#xff1a;\u6761\u4ef6\u4e3a\u771f\u5c31\u8fdb\u5165\u5faa\u73af&#xff1b;\u6761\u4ef6\u4e3a\u5047\u5c31\u9000\u51fa\u5faa\u73af&#xff0c;\u4e00\u822c\u5e94\u7528\u5728\u672a\u77e5\u5faa\u73af\u6b21\u6570\u7684\u73af\u5883\u3002<\/p>\n<h4>1.1\u3001while\u8bed\u6cd5<\/h4>\n<p>while [ \u8868\u8fbe\u5f0f ]<br \/>\n    do<br \/>\n        command&#8230;<br \/>\n    done<\/p>\n<p>while  [ 1 -eq 1 ] \u00a0  \u6216\u8005 (( 1 &gt; 2 ))<br \/>\n  do<br \/>\n \u00a0 \u00a0 command<br \/>\n \u00a0 \u00a0 command<br \/>\n \u00a0 \u00a0 &#8230;<br \/>\n done <\/p>\n<p>\u6848\u4f8b \u4f7f\u7528for\u5faa\u73af\u548cwhile\u5faa\u73af\u5206\u522b\u5faa\u73af\u6253\u5370\u6570\u7ec41-5<\/p>\n<p>\u6848\u4f8b\u4ee3\u7801<\/p>\n<p>for\u5faa\u73af\u6253\u5370&#xff1a;<br \/>\nfor ((i&#061;1;i&lt;&#061;5;i&#043;&#043;))<br \/>\ndo<br \/>\n    echo $i<br \/>\ndone<br \/>\n\u200b<br \/>\nwhile\u5faa\u73af\u6253\u5370&#xff1a;<br \/>\n#\u6253\u5370\u6570\u5b571-5<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: \u6253\u53701-5<br \/>\n\u200b<br \/>\nnum&#061;1<br \/>\nwhile [ $num -le 5 ]<br \/>\n  do<br \/>\n \u00a0 \u00a0  echo $num<br \/>\n \u00a0 \u00a0  let num&#043;&#043;<br \/>\ndone <\/p>\n<p>\u5907\u6ce8&#xff1a; \u77e5\u9053\u5faa\u73af\u6b21\u6570\u5c31\u53ef\u4ee5\u7528for&#xff0c;\u6bd4\u5982\u8bf4\u4e00\u5929\u9700\u8981\u5faa\u73af24\u6b21&#xff1b;\u5982\u679c\u4e0d\u77e5\u9053\u4ee3\u7801\u8981\u5faa\u73af\u591a\u5c11\u6b21&#xff0c;\u90a3\u5c31\u7528while&#xff0c;\u6bd4\u5982\u6211\u4eec\u4f5c\u4e1a\u4e2d\u8981\u6c42\u5199\u7684\u731c\u6570\u5b57&#xff0c;\u6bcf\u4e2a\u4eba\u731c\u5bf9\u4e00\u4e2a\u6570\u5b57\u7684\u6b21\u6570\u90fd\u662f\u4e0d\u80fd\u56fa\u5b9a\u7684&#xff0c;\u4e5f\u662f\u672a\u77e5\u7684\u3002<\/p>\n<h3>\u4e8c\u3001while\u4e0eshell\u8fd0\u7b97<\/h3>\n<h4>2.1\u3001\u6bd4\u8f83\u8fd0\u7b97<\/h4>\n<p>\u6848\u4f8b&#xff1a; \u5faa\u73af\u4ea4\u4e92\u8f93\u5165\u4e00\u4e2a\u5c0f\u5199\u5b57\u6bcd&#xff0c;\u6309Q\u9000\u51fa\u5faa\u73af<\/p>\n<p>\u6848\u4f8b\u4ee3\u7801<\/p>\n<p>#\u6309Q\u9000\u51fa\u573a\u666f<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description:<br \/>\nread -p &#034;\u8bf7\u8f93\u5165\u4e00\u4e2a\u5c0f\u5199\u5b57\u6bcd,\u6309Q\u9000\u51fa: &#034; choose<br \/>\nwhile [ $choose !&#061; &#039;Q&#039; ]<br \/>\n  do<br \/>\n \u00a0 \u00a0 echo &#034;\u4f60\u8f93\u5165\u7684\u662f: $choose&#034;<br \/>\n \u00a0 \u00a0 read -p &#034;\u8bf7\u8f93\u5165\u4e00\u4e2a\u5c0f\u5199\u5b57\u6bcd,\u6309Q\u9000\u51fa: &#034; choose<br \/>\ndone <\/p>\n<h4>2.2\u3001\u903b\u8f91\u8fd0\u7b97<\/h4>\n<p>\u6848\u4f8b&#xff1a; \u4f7f\u7528\u5faa\u73af\u8bed\u53e5\u5e2e\u52a9\u4e08\u6bcd\u5a18\u6279\u91cf\u9009\u62e9\u5973\u5a7f<\/p>\n<p>\u6848\u4f8b\u4ee3\u7801<\/p>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description:<br \/>\n\u200b<br \/>\n#\u4e08\u6bcd\u5a18\u9009\u5973\u5a7f  \u5206\u522b\u6309\u7167\u59d1\u5a1820  30 \u00a0 40 \u8fdb\u884c\u4e0e\u6216\u975e\u6a21\u62df<br \/>\n\u200b<br \/>\n#1.\u7b2c\u4e00\u4e2a\u5e94\u5f81\u8005\u56de\u7b54<br \/>\nread -p &#034;\u4f60\u6709\u591a\u5c11\u94b1: &#034; money<br \/>\nread -p &#034;\u4f60\u6709\u591a\u5c11\u8f66: &#034; car<br \/>\nread -p &#034;\u4f60\u5bb6\u623f\u5b50\u6709\u51e0\u5957: &#034; house<br \/>\n\u200b<br \/>\n\u200b<br \/>\n#while [ $money -lt 10000 ]&amp;&amp;[ $car -lt 1 ]&amp;&amp;[ $house -lt 2 ]<br \/>\nwhile [ $money -lt 10000 ]||[ $car -lt 1 ]||[ $house -lt 2 ]<br \/>\n  do<br \/>\n \u00a0 \u00a0 #\u5e94\u5f81\u8005\u4e0d\u6ee1\u4f4f\u6761\u4ef6\u5f00\u59cb\u4e0b\u4e00\u6b21\u5faa\u73af<br \/>\n \u00a0 \u00a0 echo &#034;\u6709\u8bf7\u4e0b\u4e00\u4e2a&#034;<br \/>\n \u00a0 \u00a0 read -p &#034;\u4f60\u6709\u591a\u5c11\u94b1: &#034; money<br \/>\n \u00a0 \u00a0 read -p &#034;\u4f60\u6709\u591a\u5c11\u8f66: &#034; car<br \/>\n \u00a0 \u00a0 read -p &#034;\u4f60\u5bb6\u623f\u5b50\u6709\u51e0\u5957: &#034; house<br \/>\ndone<\/p>\n<p>#\u5e94\u5f81\u8005\u6ee1\u8db3\u6761\u4ef6<br \/>\necho  &#034;\u4e56\u5973\u5a7f&#xff0c;\u4f60\u600e\u4e48\u624d\u6765\u554a&#xff01;\u5973\u513f\u7ed9\u4f60\u4e86&#034; <\/p>\n<h4>2.3\u3001\u6587\u4ef6\u7c7b\u578b\u5224\u65ad<\/h4>\n<p>\u6848\u4f8b: \u4f7f\u7528\u5faa\u73af\u5224\u65ad\/tmp\/xxx\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6&#xff0c;\u5982\u679c\u4e0d\u662f\u6587\u4ef6\u7c7b\u578b\u7684\u6253\u5370\u5b57\u7b26\u4e32&#034;\u76ee\u5f55&#034;<\/p>\n<p>\u6848\u4f8b\u4ee3\u7801<\/p>\n<p>\u6587\u4ef6\u7c7b\u578b\u5224\u65ad<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description:<br \/>\n\u200b<br \/>\nwhile [ ! -f \/tmp\/xxx ]<br \/>\n do<br \/>\n \u00a0 echo \u201c\u76ee\u5f55\u201d<br \/>\n \u00a0 sleep 1<br \/>\ndone <\/p>\n<h4>2.4\u3001\u7279\u6b8a\u6761\u4ef6<\/h4>\n<p>while\u8bed\u53e5\u4e2d\u53ef\u4ee5\u4f7f\u7528\u7279\u6b8a\u6761\u4ef6\u6765\u8fdb\u884c\u5faa\u73af&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u7b26\u53f7&#034;:&#034; \u6761\u4ef6\u4ee3\u8868\u771f&#xff0c;\u9002\u7528\u4e0e\u65e0\u9650\u5faa\u73af<\/p>\n<\/li>\n<li>\n<p>\u5b57\u7b26\u4e32 \u201ctrue\u201d \u6761\u4ef6\u4ee3\u8868\u771f&#xff0c;\u9002\u7528\u4e0e\u65e0\u9650\u5faa\u73af<\/p>\n<\/li>\n<li>\n<p>\u5b57\u7b26\u4e32 &#034;false&#034;\u6761\u4ef6\u4ee3\u8868\u5047<\/p>\n<\/li>\n<\/ul>\n<p>\u4ee3\u7801\u5c55\u793a<\/p>\n<p>\u7279\u6b8a\u7b26\u53f7 :  \u4ee3\u8868\u771f<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description:<br \/>\n\u200b<br \/>\nwhile :<br \/>\n do<br \/>\n \u00a0 echo haha<br \/>\n \u00a0 sleep 1<br \/>\ndone<br \/>\n\u200b<br \/>\n\u200b<br \/>\ntrue \u5b57\u7b26\u4e32\u4ee3\u8868\u771f&#xff0c;\u548c:\u7c7b\u4f3c<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description:<br \/>\n\u200b<br \/>\nwhile true<br \/>\n do<br \/>\n \u00a0 echo haha<br \/>\n \u00a0 sleep 1<br \/>\ndone<br \/>\n\u200b<br \/>\n\u200b<br \/>\nfalse \u00a0 \u5b57\u7b26\u4e32\u4ee3\u8868\u5047&#xff0c;\u5728while\u4e2d\u4e0d\u4f1a\u5f00\u59cb\u5faa\u73af <\/p>\n<h3>\u4e09\u3001while\u4e0e\u5faa\u73af\u63a7\u5236\u8bed\u53e5<\/h3>\n<h4>3.1\u3001sleep\u8bed\u53e5<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: \u5012\u8ba1\u65f6\u6e38\u620f<br \/>\n\u200b<br \/>\n#1.\u5b9a\u4e49\u521d\u59cb\u503c<br \/>\ntime&#061;9<br \/>\n\u200b<br \/>\n#2.\u5faa\u73af\u8f93\u51fa&#xff0c;1\u79d2\u4e00\u6b21<br \/>\nwhile [ $time -ge 0 ]<br \/>\n  do<br \/>\n \u00a0 \u00a0 echo -n -e  &#034;\\\\b$time&#034;<br \/>\n \u00a0 \u00a0 let time&#8211;<br \/>\n \u00a0 \u00a0 #\u63a7\u5236\u5faa\u73af 1\u79d2\u4e00\u6b21<br \/>\n \u00a0 \u00a0 sleep 1<br \/>\ndone<br \/>\n\u200b<br \/>\n#\u56de\u8f66<br \/>\necho <\/p>\n<h4>3.2\u3001break<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: \u8f93\u51fa\u6570\u5b571-9&#xff0c;\u5f53\u8f93\u51fa5\u65f6\u505c\u6b62<br \/>\n\u200b<br \/>\n#1\u3001\u5b9a\u4e49\u521d\u59cb\u503c<br \/>\nnum&#061;1<br \/>\n\u200b<br \/>\nwhile [ $num -lt 10 ]<br \/>\n  do<br \/>\n \u00a0 \u00a0 echo $num<br \/>\n\u200b<br \/>\n \u00a0 \u00a0 #\u5224\u65ad\u5f53\u524dnum\u7684\u503c&#xff0c;\u5982\u679c\u7b49\u4e8e5\u5c31\u8df3\u51fa\u5faa\u73af<br \/>\n \u00a0 \u00a0 if [ $num -eq 5 ]<br \/>\n \u00a0 \u00a0 \u00a0  then<br \/>\n        break<br \/>\n \u00a0 \u00a0 fi<br \/>\n\u200b<br \/>\n \u00a0 \u00a0 #\u81ea\u52a8\u7d2f\u52a0<br \/>\n \u00a0 \u00a0 let num&#043;&#043;<br \/>\ndone <\/p>\n<h4>3.3\u3001continue<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author:<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: \u8f93\u51fa\u6570\u5b571-9,\u5f53\u7b49\u4e8e5\u65f6\u8df3\u8fc7\u672c\u6b21\u5faa\u73af&#xff0c;\u8f93\u51fa1\u30012\u30013\u30014\u30016\u30017\u30018\u30019<\/p>\n<p>#1\u3001\u5b9a\u4e49\u521d\u59cb\u503c<br \/>\nnum&#061;0<\/p>\n<p>while [ $num -lt 9 ]<br \/>\n  do<br \/>\n     #\u81ea\u52a8\u7d2f\u52a0<br \/>\n     let num&#043;&#043;<\/p>\n<p>     #\u5224\u65ad\u5f53\u524dnum\u7684\u503c&#xff0c;\u5982\u679c\u7b49\u4e8e5\u5c31\u8df3\u8fc7\u672c\u6b21\u5faa\u73af<br \/>\n     if [ $num -eq 5 ]<br \/>\n        then<br \/>\ncontinue<br \/>\n     fi<\/p>\n<p>     #\u8f93\u51fanum\u7684\u503c<br \/>\n     echo $num<br \/>\ndone <\/p>\n<h3>\u56db\u3001while\u5d4c\u5957\u5176\u4ed6\u8bed\u53e5<\/h3>\n<h4>4.1\u3001while\u5d4c\u5957if<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: \u8f93\u51fa\u6570\u5b571-9&#xff0c;\u5f53\u8f93\u51fa5\u65f6\u505c\u6b62<\/p>\n<p>#1\u3001\u5b9a\u4e49\u521d\u59cb\u503c<br \/>\nnum&#061;1<\/p>\n<p>while [ $num -lt 10 ]<br \/>\n  do<br \/>\n     echo $num<\/p>\n<p>     #\u5224\u65ad\u5f53\u524dnum\u7684\u503c&#xff0c;\u5982\u679c\u7b49\u4e8e5\u5c31\u8df3\u51fa\u5faa\u73af<br \/>\n     if [ $num -eq 5 ]<br \/>\n        then<br \/>\nbreak<br \/>\n     fi<\/p>\n<p>     #\u81ea\u52a8\u7d2f\u52a0<br \/>\n     let num&#043;&#043;<br \/>\ndone <\/p>\n<h4>4.2\u3001while\u5d4c\u5957for<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: 99\u4e58\u6cd5\u8868<\/p>\n<p>A&#061;1<br \/>\nwhile [ $A -lt 10 ]<br \/>\n  do<br \/>\n    for ((B&#061;1;B&lt;&#061;$A;B&#043;&#043;))<br \/>\n       do<br \/>\n  echo -n -e &#034;$B*$A&#061;$((A*B)) \\\\t&#034;<br \/>\n   done<br \/>\n   echo<br \/>\n   let A&#043;&#043;<br \/>\ndone <\/p>\n<h4>4.3\u3001while\u5d4c\u5957while<\/h4>\n<p>#!\/bin\/bash<br \/>\n#<br \/>\n#Author: www.zutuanxue.com<br \/>\n#Created Time:<br \/>\n#Release:<br \/>\n#Description: 99\u4e58\u6cd5\u8868<\/p>\n<p>#\u5b9a\u4e49A<br \/>\nA&#061;1<br \/>\nwhile [ $A -lt 10 ]<br \/>\n  do<br \/>\n      #\u5b9a\u4e49B<br \/>\n      B&#061;1<br \/>\n      while [ $B -le $A ]<br \/>\n        do<br \/>\n          echo -n -e &#034;$B*$A&#061;$((A*B)) \\\\t&#034;<br \/>\n          let B&#043;&#043;<br \/>\n      done<\/p>\n<p>   echo<br \/>\n   let A&#043;&#043;<br \/>\ndone <\/p>\n<h3>\u4e94\u3001\u5b66\u4e60\u89c6\u9891<\/h3>\n<p>\u89c6\u9891&#xff1a;while\u4ecb\u7ecd \u89c6\u9891&#xff1a;while\u4e0eshell\u8fd0\u7b97 \u89c6\u9891&#xff1a;while\u5faa\u73af\u63a7\u5236 \u89c6\u9891: while\u5d4c\u5957<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.1k\u6b21\uff0c\u70b9\u8d5e51\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u6761\u4ef6\u4e3a\u771f\u5c31\u8fdb\u5165\u5faa\u73af\uff1b\u6761\u4ef6\u4e3a\u5047\u5c31\u9000\u51fa\u5faa\u73af\uff0c\u4e00\u822c\u5e94\u7528\u5728\u672a\u77e5\u5faa\u73af\u6b21\u6570\u7684\u73af\u5883\u3002_shell while<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,473,43,44],"topic":[],"class_list":["post-10684","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-shell","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/10684.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.1k\u6b21\uff0c\u70b9\u8d5e51\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u6761\u4ef6\u4e3a\u771f\u5c31\u8fdb\u5165\u5faa\u73af\uff1b\u6761\u4ef6\u4e3a\u5047\u5c31\u9000\u51fa\u5faa\u73af\uff0c\u4e00\u822c\u5e94\u7528\u5728\u672a\u77e5\u5faa\u73af\u6b21\u6570\u7684\u73af\u5883\u3002_shell while\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/10684.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T10:08:03+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10684.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/10684.html\",\"name\":\"shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T10:08:03+00:00\",\"dateModified\":\"2025-04-18T10:08:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/10684.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/10684.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/10684.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"shell\u811a\u672c--\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/10684.html","og_locale":"zh_CN","og_type":"article","og_title":"shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb4.1k\u6b21\uff0c\u70b9\u8d5e51\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u6761\u4ef6\u4e3a\u771f\u5c31\u8fdb\u5165\u5faa\u73af\uff1b\u6761\u4ef6\u4e3a\u5047\u5c31\u9000\u51fa\u5faa\u73af\uff0c\u4e00\u822c\u5e94\u7528\u5728\u672a\u77e5\u5faa\u73af\u6b21\u6570\u7684\u73af\u5883\u3002_shell while","og_url":"https:\/\/www.wsisp.com\/helps\/10684.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T10:08:03+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/10684.html","url":"https:\/\/www.wsisp.com\/helps\/10684.html","name":"shell\u811a\u672c-\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T10:08:03+00:00","dateModified":"2025-04-18T10:08:03+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/10684.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/10684.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/10684.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"shell\u811a\u672c--\u6d41\u7a0b\u63a7\u5236-while\u5faa\u73af"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=10684"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/10684\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=10684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=10684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=10684"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=10684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}