10 2015 档案

摘要:功能:读取输入,打印;如果长度小于MINLEN,那么输出空格。#!/bin/bash# paragraph-space.sh# Insert a blank line between paragraphs of a single-spaced text file.# Usage: $0 <FILEN... 阅读全文
posted @ 2015-10-29 22:18 快乐的小土狗 阅读(169) 评论(0) 推荐(0)
摘要:参考文档:python正则表达式正则表达式定义:正则是一门高度专业编程语言,内嵌在其他语言(python re模块)中使用。正则表达式包含元字符(metacharacter)列表,列表如下:. ^ $ * +? { [ ] \ | ( ),这些元字符只有在合适的位置才可以发挥作用。1. []用来指定... 阅读全文
posted @ 2015-10-28 19:35 快乐的小土狗 阅读(186) 评论(0) 推荐(0)
摘要:参考文档:http://blog.csdn.net/wusuopubupt/article/details/29379367ipython环境中,输入"?re",官方解释如下:This module exports the following functions: match Match... 阅读全文
posted @ 2015-10-28 18:59 快乐的小土狗 阅读(211) 评论(0) 推荐(0)
摘要:subprocess.call("ping -c 1 %s" % ip,shell = True,stdout = open('/dev/null','w'),stderr = subprocess.STDOUT)ping发送一个ICMP请求,并且将标准输出重定向到/dev/null,相当于丢弃,并... 阅读全文
posted @ 2015-10-22 15:01 快乐的小土狗 阅读(3423) 评论(0) 推荐(0)
摘要:https://docs.oracle.com/javase/tutorial/java/data/numberformat.htmlFormatting Numeric Print OutputEarlier you saw the use of theprintandprintlnmethods... 阅读全文
posted @ 2015-10-21 22:45 快乐的小土狗 阅读(552) 评论(0) 推荐(0)
摘要:package com.example.helloworld;/** * Created by carl on 10/21/15. */public class StringChecker { public static void main(String[] arguments) { ... 阅读全文
posted @ 2015-10-21 21:37 快乐的小土狗 阅读(140) 评论(0) 推荐(0)
摘要:StringTokenizer类别可以通过某个字符或者多个字符作为分界符,来将字符串划分为多个标记(token)。package com.example.helloworld;import java.util.StringTokenizer;/** * Created by carl on 10/2... 阅读全文
posted @ 2015-10-21 21:02 快乐的小土狗 阅读(171) 评论(0) 推荐(0)
摘要:1 os.system 可以返回运行shell命令状态,同时会在终端输出运行结果 例如 ipython中运行如下命令,返回运行状态status 2 os.popen() 可以返回运行结果 运行返回结果 3 如何同时返回结果和运行状态,commands模块: commands示例如下: 4 使用模块s 阅读全文
posted @ 2015-10-21 15:28 快乐的小土狗 阅读(31022) 评论(0) 推荐(0)