引用ThoughtWorks.QRCode.dll (源代码里有)1、简单二维码生成及解码代码: //生成二维码方法一 private void CreateCode_Simple(string nr) { QRCodeEncoder ...
分类:
Web程序 时间:
2015-06-21 23:46:45
阅读次数:
196
[root@QD1_Mastershell_scripts]#grep‘123‘*x:123fdafdsa[root@QD1_Mastershell_scripts]#grep-r‘123‘*a/z:123x:123fdafdsa[root@QD1_Mastershell_scripts]#lsaxy[root@QD1_Mastershell_scripts]#grep-nr‘123‘*a/z:2:123x:1:123fdafdsa
分类:
其他好文 时间:
2015-06-18 20:03:16
阅读次数:
92
现在我们来看一些例子,它们以变量NR开头。将前面计算平均成绩的脚本中的print语句修改为:
$ cat grades
john 85 92 78 94 88
andrea 89 90 75 90 86
jasper 84 88 80 92 84
$ cat grades.awk
#求5个成绩的平均值
{ total = $2 + $3 + $4 + $5 + $6
a...
分类:
其他好文 时间:
2015-06-17 09:44:36
阅读次数:
128
需要安装lsof工具比如查8999端口:lsof-i:8999|awk‘{if(NR>1)print$2}‘如果返回空表示没被占用
分类:
系统相关 时间:
2015-06-10 15:51:23
阅读次数:
180
按照行号过滤文本,添加授权语句cat-ntables.txt|awk‘{if(NR>=4&&NR<=66)print"GRANTALLONTABLE"$4"TOtestuser;"}‘过滤授权表,执行授权
分类:
系统相关 时间:
2015-06-09 14:06:04
阅读次数:
205
cat > temp000180255798957892187719awk '{x[NR]=$0; s+=$0; n++} END{a=s/n; for (i in x){ss += (x[i]-a)^2} sd = sqrt(ss/n); print "SD = "sd}' temp0001SD ...
分类:
系统相关 时间:
2015-06-06 11:50:41
阅读次数:
3042
cat access.log|awk '{print $0}'|sort|uniq -c|sort -nr|head -n 10
分类:
Web程序 时间:
2015-06-05 19:30:59
阅读次数:
108
引用原文shell脚本:#/bin/bashLOAD=$(awk‘{print$1}‘/proc/loadavg)CPUNUM=$(grep-cprocessor/proc/cpuinfo)if[$(echo"$LOAD>$CPUNUM"|bc)=1];thenRESULT=$(ps-eopcpu,pmem,user,args|awk‘$1>0‘|sort-nr)if[-n"$RESULT"];thenecho"$RESULT">/var/log/ps.$(date+"%Y%m%..
分类:
系统相关 时间:
2015-06-03 19:49:22
阅读次数:
279
js插件代码如下:$.fn.extend({ //焦点图 INA_focus:function(opt,callback){ if(!opt){} var _this=$(this),nr=_this.find(opt.qhys||"img"),controls=opt.controls||"...
分类:
其他好文 时间:
2015-06-02 15:00:01
阅读次数:
91
输出匹配funcno或type:awk 'funcno|type'输出两次正则表达式匹配之间的行:awk '/funcno/, /type/'删除所有的空行:awk NF从第8行输出到第12行: awk 'NR==8,NR==12'标记:ARGC 命令行参数个数ARGV ...
分类:
其他好文 时间:
2015-05-25 18:21:10
阅读次数:
125