#!/bin/bash n=0 max=11 while(($n<max)) do curl -sS --connect-timeout 1000 -m 60000 'http://wx.com/inex' //访问url n=($n+1) sleep 5 done 脚本写好后将添加到linux服务 ...
分类:
Web程序 时间:
2020-02-24 16:53:11
阅读次数:
177
4.3.3 while条件循环语句 while条件循环语句是一种让脚本根据某些条件来重复执行命令的语句,它的循环结构往往在执行前并不确定最终执行的次数,完全不同于for循环语句中有目标、有范围的使用场景。while循环语句通过判断条件测试的真假来决定是否继续执行命令,若条件为真就继续执行,为假就结束 ...
分类:
其他好文 时间:
2020-02-24 14:48:01
阅读次数:
88
1、获取绝对路径以及命令是否成功 SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) 2、或命令分析 command1 || command2 如果||左边的命令(命令1)未执行成功,那么就执行||右边的命令(命令2) 3、docker images过滤指定的镜像 do ...
分类:
系统相关 时间:
2020-02-24 12:53:05
阅读次数:
72
Given an unsorted integer array, remove adjacent duplicate elements repeatedly, from left to right. For each group of elements with the same value do ...
分类:
其他好文 时间:
2020-02-24 09:52:00
阅读次数:
84
Given a sorted integer array, remove duplicate elements. For each group of elements with the same value do not keep any of them. Do this in-place, usi ...
分类:
其他好文 时间:
2020-02-24 09:17:03
阅读次数:
77
Linux-第六课时 接着上次课程的if判断和for循环,现在学习了while循环和case条件判断,逻辑上和C语言中的相同,注意具体格式编写。 while循环: while 条件测试操纵 do 命令序列 done 其中满足条件后可以用exit 0来跳出循环。 case条件判断: case 变量值 ...
分类:
系统相关 时间:
2020-02-24 00:37:43
阅读次数:
87
CentOS 7中安装 MySQL 出现了 No package mysql-server available. Error: Nothing to do 错误 ...
分类:
数据库 时间:
2020-02-24 00:21:09
阅读次数:
104
通过调用Scanner类实现键盘导入数据,到程序中. 通过调用Random类产尘随机数 猜数字游戏,有次数限制,代码如下 通过for循环 或者 while循环来限制循环次数 ...
分类:
编程语言 时间:
2020-02-24 00:09:58
阅读次数:
111
[TOC] 03 string字符串和while循环 1. string介绍 python中字符串通常以单引号或者双引号来创建,是计算机语言中最常见的数据类型 string不可变,即如果修改,将会重新分配内存地址 2. 字符串的运算 字符串相加:也就是字符串拼接 字符串乘法: 也就是重复字符串n次, ...
分类:
其他好文 时间:
2020-02-23 20:41:10
阅读次数:
106
1 // 插入排序的写法:即使不需要哨兵,也可以写的很流畅。 2 int* insertionSort(int* A, int n) { 3 // write code here 4 for(int i=1;i<n;i++){ 5 int j=i-1,tmp=A[i]; 6 while(j>=0 & ...
分类:
编程语言 时间:
2020-02-23 18:25:30
阅读次数:
83