码迷,mamicode.com
首页 >  
搜索关键字:done    ( 2584个结果
python学习之爬虫(一) ——————爬取网易云歌词
接触python也有一段时间了,一提到python,可能大部分pythoner都会想到爬虫,没错,今天我们的话题就是爬虫!作为一个小学生,关于爬虫其实本人也只是略懂,怀着”Done is better than perfect”的态度硬着头皮开始了这篇文章的撰写!好了,废话不多说! 先说一下今天我们 ...
分类:编程语言   时间:2017-04-25 19:55:45    阅读次数:1224
Bash之while循环
while语句可根据特定的条件重复执行命令序列,比较适合有规律的循环操作。格式:while条件do命令序列done示例:#!/bin/bashA=192.168.154.B=1while[$B-le10]doping-c3$A$B&>/dev/nullif[$?-eq0]thenecho"This$A$Bisup"elseecho"This$A$Bisdown"fi((B++))done类似C语言风..
分类:其他好文   时间:2017-04-25 10:15:32    阅读次数:84
linux shell常用命令
for循环applist=(app1app2app3);forappin${applist[@]};doecho$app;done;获取IP地址ifconfig|grep-Po‘(?<=addr:).*(?=Bc)‘ifconfig|awk-F"[:]+"‘$4~/[0-9].+[^0-9]+/{print$4}/lo/{exit}‘ifconfig|sed-nr‘s/^[[:space:]]+inetaddr:(.*)Bcast.*/\1/p‘ifconfig|grep-o‘\([1-9]..
分类:系统相关   时间:2017-04-24 23:06:21    阅读次数:189
shell 通过shift获得某位后的入参
有时shell的入参个数不定,想要获得第2位后的参数,作为新的入参调用其他脚本 通常这时候想到的方法是用遍历,例如下面的方法: for (( i=2;i<=$#;i++)) do echo $i done 更简便的方法:使用shift去移动参数,shift (n),默认n为1,移动的位数 shift ...
分类:系统相关   时间:2017-04-24 23:04:17    阅读次数:157
文章或者观点说说等点赞功能实现(thinkphp)
前端的代码: 当然数据的处理用ajax,不过先要引入jquery和jquery.cookie.js,这个就自行百度下载吧。前端会用cookie来限制重复点赞的效果。 js部分: 后端接收数据:IndexController.class.php done! ...
分类:Web程序   时间:2017-04-24 14:39:36    阅读次数:1456
shell中的select循环使用
select单独使用catselect01.sh #!/bin/bash echo"Whichcardoyouprefer?" selectCARinBenzAudiVolksWagen do break done echo"Youchose$CAR"运行结果shselect01.sh Whichcardoyouprefer? 1)Benz 2)Audi 3)VolksWagen #?1 YouchoseBenzselect和case结合使用catselect02.sh #!/bin..
分类:系统相关   时间:2017-04-24 09:56:41    阅读次数:224
HFTP Guide
Introduction(说明) HFTP is a Hadoop filesystem implementation that lets you read data from a remote Hadoop HDFS cluster. The reads are done via HTTP, an ...
分类:其他好文   时间:2017-04-23 15:55:04    阅读次数:281
linux shell scripts:Syntax error: Bad for loop variable
执行脚本报错 #!/bin/bash s=0 for (( i=1; i<=100; i++ )) do s=$(( $s + $i )) done echo $s sh add.sh 报错: add.sh: 4: Syntax error: Bad for loop variable 代码没有错误 ...
分类:系统相关   时间:2017-04-22 15:37:31    阅读次数:184
HDU1950-Bridging signals-最长上升子序列
Description 'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up co ...
分类:其他好文   时间:2017-04-22 13:09:19    阅读次数:277
Bash之随机数
$RANDOM:产生随机数vima.sh#运用脚本产生10个随机数#!/bin/basha=1b=10while[$a-le$b]donumber=$RANDOMecho$number((a++))done[root@localhost~]#chmod+xa.sh[root@localhost~]#./a.sh17065408010702898823160230922978309761217618189
分类:其他好文   时间:2017-04-22 09:55:12    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!