会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
helloweworld
博客园
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
48
下一页
2014年6月13日
爬虫--登录网页
摘要: #!/usr/bin/env python# -*- coding: utf-8 -*-############################################## File : loginMMVOIP.py# Author : lucasysfeng# Re...
阅读全文
posted @ 2014-06-13 16:42 helloweworld
阅读(370)
评论(0)
推荐(0)
2014年6月11日
shell--字符串是否为空
摘要: b1=b2=""b3="hello"if [[ -n "${b3}" ]]then echo "not null"else echo "null"fib1 nullb2 nullb3 not null-n str 字符串长度非零
阅读全文
posted @ 2014-06-11 10:49 helloweworld
阅读(1195)
评论(0)
推荐(0)
2014年6月10日
python--正则表达式 字符串匹配
摘要: import rereg = re.compile(r"voip", re.IGNORECASE)print reg.findall("23oipvoipsnvoipc")输出['voip', 'voip']findall() 找到 RE 匹配的所有子串,并把它们作为一个列表返回http://wik...
阅读全文
posted @ 2014-06-10 22:29 helloweworld
阅读(1177)
评论(0)
推荐(0)
2014年6月9日
mysql---表所在数据库
摘要: >> status;
阅读全文
posted @ 2014-06-09 23:32 helloweworld
阅读(169)
评论(0)
推荐(0)
2014年6月4日
python--日期操作
摘要: import datetimedatetime有几个常用类:date time datetime timedelta1. 今天日期时间(今天时间)>>> import datetime>>> now = datetime.datetime.now()>>> print now2014-06...
阅读全文
posted @ 2014-06-04 21:37 helloweworld
阅读(380)
评论(0)
推荐(0)
2014年6月2日
shell--日期格式化显示和日期的加减
摘要: 1. 显示当前日期时间.$ dateMon Jun 2 13:55:47 HKT 2014当前时间戳:date +%s2. 按照指定格式显示当前时间(date +format).(1). 显示年月日.$ date "+%Y-%m-%d"2014-06-02$ date "+%F"2014-06-0...
阅读全文
posted @ 2014-06-02 14:16 helloweworld
阅读(3617)
评论(0)
推荐(0)
shell--查看目录及文件大小
摘要: du -h --max-depth=1注: 如果没有--max-depth=1,则会递归显示所有目录,这通常不是我们需要的,因此一班加上要查的深度.df 命令是查看文件系统给的大小.
阅读全文
posted @ 2014-06-02 13:49 helloweworld
阅读(2900)
评论(0)
推荐(0)
2014年5月31日
shell--函数返回值
摘要: #!/bin/bashfunction myfun(){ echo "echo result" return 0}returnValue=$(myfun)echo "${returnValue}"这里returnValue得到的并不是0,而是"echo result",想要得到funct...
阅读全文
posted @ 2014-05-31 21:32 helloweworld
阅读(291)
评论(0)
推荐(0)
shell--cut提取某个字符 字节 域
摘要: 参考:http://blog.sina.com.cn/s/blog_5e77c61f0100hqky.html1. cut是以每一行为一个处理对象的,这种机制和sed是一样的。2. cut一般以什么为依据呢? 也就是说,我怎么告诉cut我想定位到的剪切内容呢?cut命令主要是接受三个定位方法:第一,...
阅读全文
posted @ 2014-05-31 01:21 helloweworld
阅读(1043)
评论(0)
推荐(0)
shell-sort排序
摘要: 1. 从小到大排序(默认).sort将文件的每一行作为一个单位,相互比较,比较原则是从首字符向后,依次按ASCII码值进行比较,最后将他们按升序输出。[rocrocket@rocrocket programming]$ cat seq.txtbananaapplepearorange[rocrock...
阅读全文
posted @ 2014-05-31 01:08 helloweworld
阅读(2986)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
48
下一页