自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

转载 python thread process pool

from multiprocessing import Process import os子进程要执行的代码def run_proc(name): print ‘Run child process %s (%s)…’ % (name, os.getpid())if name==’main‘: print ‘Parent process %s.’ % os.getpid()...

2018-08-21 17:28:16 324

转载 tee linux echo

echo … | tee -a a bit is used to write into two files.

2018-08-20 15:20:21 200

转载 sed linux

http://man.linuxde.net/sedsed -n ‘p;n’ test.txt #奇数行 sed -n ‘n;p’ test.txt #偶数行sed -n ‘1~2p’ test.txt #奇数行 sed -n ‘2~2p’ test.txt #偶数行互换模式空间和保持缓冲区的内容。也就是把包含test与check的行互换:sed -e ‘/test/h...

2018-08-16 22:28:48 119

转载 xargs

echo `xargs<1.txt` | tr ’ ’ ‘,’ note: it is used to combine multiple lines into one line and replace space as “,”

2018-08-16 21:18:46 164

转载 linux array

#! /bin/bash firstArg=$1default_IFS=”$IFS” IFS=”,”allArg=($firstArg)IFS=”$defalut_IFS”for eachArg in ${allArg[@]}do echo $eachArg donenote: it is used to pass arg, arg, arg with $1 int...

2018-08-16 10:16:49 220

转载 python date time jSon dic

#1. def month_scope(start=None): if start is None: raise ValueError(‘start is null’) ingore_var, daysOfMonth = calendar.monthrange(start.year,start.month) firstdayOfNextMonth=...

2018-08-16 10:02:25 199

转载 linux =~ shell

#1 The =~ Regular Expression match operator no longer requires quoting of the pattern within [[ … ]].把测试条件换成下面这样就成功了。if [[ “newip"= ([0−9]1,3.)3[0−9]1,3newip"= ([0−9]1,3.)3[

2018-08-16 09:33:36 201

转载 awk process ' and "

Claim: below content is learnt from other people. 双引号:awk ‘{print “\”“}’ #放大:awk ‘{print ” \” “}’使用“”双引号把一个双引号括起来,然后用转义字符\对双引号进行转义,输出双引号。单引号:awk ‘{print “’\””}’ # 放大: awk ‘{pri...

2018-08-15 17:54:59 191

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除