码迷,mamicode.com
首页 >  
搜索关键字:shell memcache printf    ( 45225个结果)
Apache commons VFS之Shell源代码示例
这个示例主要是模拟一个Shell程序,通过输入一些命令,执行操作。源代码来自官网。 这个示例的特点: 1.       接收用户的输入; 2.       通过字符解析和判断; 3.       利用VFS自带的一些功能进行功能实现;   package test.ffm83.commons.VFS;   import java.io.BufferedReader; import...
分类:Web程序   时间:2014-12-22 16:18:33    阅读次数:163
统计不同的单词个数。
Problem Description lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。   Input 有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。   Output 每组只输出一个整数,其单独成行,该整...
分类:其他好文   时间:2014-12-22 09:32:56    阅读次数:307
随机取出若干个文件脚本
#!/bin/bash #随机取出res目录下20个大于50K的图片并输出其名称 res=(`findres/-name"*.png"-size+50k-o-name"*.jpg"-size+50k`) tmp_file="/tmp/temp_res.txt" touch$tmp_file >$tmp_file while[[`uniq$tmp_file|wc-l`!=20]] do echo`expr$RANDOM%${#res[@]}`>>$t..
分类:其他好文   时间:2014-12-22 02:07:10    阅读次数:205
[C语言]流程控制, 复合赋值, 循环
----------------------------------------------------------------------------------------//单一判断if(a int main() { int a; a = 2; printf("a++=%d \n", a...
分类:编程语言   时间:2014-12-22 02:00:20    阅读次数:168
逆序输出字符串
#include #include int main (){char str[100];int i,j;gets(str);j=strlen(str);for(i=j-1;i>=0;i--){printf("%c",str[i]);} return 0;}
分类:其他好文   时间:2014-12-22 00:56:46    阅读次数:169
ASCII排序
#includeint main(){int i,j;char k[10],t;printf("请输入10个字符多余无效(单个字母或数字):\n");for(i=0;ik[j]){t=k[i];k[i]=k[j];k[j]=t;}}}printf("按照ASCII代码表规则排序:\n");for(i...
分类:编程语言   时间:2014-12-22 00:51:13    阅读次数:240
【c语言】利用指针进行两个数的交换。
#includevoid swap(int *a,int *b){ int temp; temp=*a; *a=*b; *b=temp;}void main(){ int a,b,*m,*n; a=4; b=5; m=&a; n=&b; printf("a=%d,b=%d\n",a,b); swap...
分类:编程语言   时间:2014-12-21 23:23:28    阅读次数:361
【c语言】使用NULL和指针来寻找数组中是否存在指定的数字
#include#includevoid main(){ int a[5],i,*p; int x=10; srand(time()); printf("input data to array:\n"); for(i=0;i<5;i++){ a[i]=rand()%100; printf("%-.....
分类:编程语言   时间:2014-12-21 23:21:20    阅读次数:252
Shell字符串削除
Shell string.
分类:系统相关   时间:2014-12-21 22:03:15    阅读次数:179
func && operation_yes || operation_no (Shell)
function return value,&& ||
分类:系统相关   时间:2014-12-21 17:51:58    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!