码迷,mamicode.com
首页 >  
搜索关键字:shell memcache printf    ( 45225个结果)
windows创建桌面快捷方式的VBA脚本
Dim wShell, oShortcut 'Dim strDesktop$ ' 为了与VBS兼容, Dim strDesktop ' 这里改写一下,测试通过。。。 Set wShell = CreateObject("Wscript.shell") strDesktop = wShell.Spe....
分类:Windows程序   时间:2014-08-05 13:34:19    阅读次数:348
批量登陆linux主机脚本
#test.sh #!/bin/bash dir=/home/test whilereadline do host=`echo$line|awk‘{print$1}‘` passwd=`echo$line|awk‘{print$2}‘` $dir/expect_ssh.sh$host$passwd& done<$dir/host.txt #expect_ssh.sh #!/usr/bin/envexpect setHOST[lindex$argv0] setPASSWD[lindex$argv..
分类:系统相关   时间:2014-08-05 11:33:10    阅读次数:243
使用memcache.php监控memcached
memcache.php在memcahce-2.2.7包内memcahce-2.2.7下载地址:http://pecl.php.net/get/memcache-2.2.7.tgz将memcahce-2.2.7包内的memcache.php放在apache的htdocs目录下:[root@node1memcache-2.2.7]#cpmemcache.php/home/webserver/httpd/htdocs/修改memcache.php内容:[root@n..
分类:Web程序   时间:2014-08-05 11:29:00    阅读次数:231
使用jq工具在Shell命令行处理JSON数据
因为最近要处理一些 JSON 数据格式,所以在经过一番搜索后 最终找到了 jq 这个很棒的工具。jq 允许你直接在命令行下对 JSON 进行操作,包括分片、过滤、转换等等。 让我们通过几个例子来说明 jq 的功能: 一、输出格式化,漂亮的打印效果 如果我们用文本编辑器打开 JSON,有时候可能看起来会一团糟,但是通过 jq 的 .(点)过滤器就可以立马让 JSON 的格式规整起来。 1.用...
分类:Web程序   时间:2014-08-05 09:40:29    阅读次数:247
13期末7
#include "stdio.h" void main(){ int x,y; for (x=0, y=0 ; (y!=123) &&(x<4); x++) y++; printf("x=%d,y=%d\n",x,y); } 不管老师给多少答案  自己的努力一定会有结果的...
分类:其他好文   时间:2014-08-05 09:36:58    阅读次数:216
UVa11054
一开始WA了一次,这才反应过来应该用longlong而不是int,但是scanf和printf不知道哪出毛病了,运行不出来正确的结果,改成cin cout过了从左向右扫描即可,对于第i的村庄到第i+1的村庄,肯定有abs(a[i+1]-a[i])个劳动力要花费#include #include #i...
分类:其他好文   时间:2014-08-05 09:25:48    阅读次数:216
详细理解“>/dev/null 2>&1”
Linux系统中无论是crontab里面,还是平时使用的命令,经常会碰到">/dev/null 2>&1"。比如说:在Crontab Job里面,如果不想发送邮件,那么有两种方法: 一是将MAILTO="", 设置为空 [root@host etc]# cat crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO="" HOME=/ # run-parts 01 * * * * root run-parts /etc/cron...
分类:其他好文   时间:2014-08-05 00:47:48    阅读次数:344
13期末1
#include "stdio.h" void main(){ int i=0, a[]={3,4,5,4,3}; do { a[i]++; }while(a[++i]<5); for(i=0;i<5;i++) printf("%d\n",a[i]) ; }...
分类:其他好文   时间:2014-08-05 00:46:38    阅读次数:254
13期末2
#include "stdio.h" void main(){ int a = 7; int b = 1; printf ( "a&b = %d\n",a&b); printf( "a&&b = %d\n",a&&b); }...
分类:其他好文   时间:2014-08-05 00:45:28    阅读次数:173
13期末4
#include "stdio.h" void main(){ int sum=0,item=0; while(item<7){ item++; sum+=item; if(sum==7) break; } printf("%d\n",sum); }...
分类:其他好文   时间:2014-08-05 00:44:48    阅读次数:279
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!