摘要:
#!/bin/bash logHome=/data/server/tomcats/tomcat7_8180_apiService/logs resultLog=/data/shell/result_fetch.out cd $logHome filelist=`ls $logHome|grep -w FACEBOOK20140723` for file in $filelist do if... 阅读全文
摘要:
Python中的循环语句有 for 和 while。 while 循环 Python中while语句的一般形式: while 判断条件: 语句 同样需要注意冒号和缩进。另外,在Python中没有do..while循环。 以下实例使用了 while 来计算 1 到 100 的总和: 实例 #!/usr/bin/env python3 n = 100 sum = 0 coun... 阅读全文