上一页 1 ··· 207 208 209 210 211 212 213 214 215 ··· 337 下一页
摘要: LINUX Find命令使用 find -name april* 在当前目录(包括子目录)下查找以 april 开始的文件find -name april* fprint file 在当前目录下查找以april开始的文件,并把结果输出到file中find -name ap* -o -name may 阅读全文
posted @ 2013-09-17 22:15 emanlee 阅读(732) 评论(0) 推荐(0)
摘要: Test:ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz success.ftp://ftp.gnu.org/gnu/gsl/gsl-1.13.0.tar.gz failed.The GNU Scientific Library is an open source... 阅读全文
posted @ 2013-09-13 07:25 emanlee 阅读(9392) 评论(0) 推荐(1)
摘要: 压缩: tar -zcvf 压缩后文件名.tar.gz 被压缩文件 tar -cvf myfile.tar *.jpg # 将所有 jpg 文件打包 解压: tar -zxvf 被解压文件 tar -xvf 被解压文件 # 解压没有压缩的文件 注意:不要有多余的空格,一个空格即可。 具体的可以在li 阅读全文
posted @ 2013-09-11 18:01 emanlee 阅读(3179) 评论(0) 推荐(0)
摘要: bash 正则表达式匹配,一行文本中 “包含 ABC” 并且 “不包含 XYZ”A文件: XXXX ABC XXX4444444444444444XXXX ABC XXX XYZ6666666666666666666666得到B文件:XXXX ABC XXX4444444444444444sed-... 阅读全文
posted @ 2013-09-08 17:47 emanlee 阅读(1026) 评论(0) 推荐(0)
摘要: file的内容如下: ADSFADSFSDFASDFJKJK ADSFADSFSDFASDFJKJK ADSFADSFSDFASDFJKJK linux 用grep匹配第2行和第4行横短线: grep "^-*$" file linux 用grep匹配不含横短线的行:grep -v "^-*$" f 阅读全文
posted @ 2013-09-08 11:14 emanlee 阅读(2144) 评论(0) 推荐(0)
摘要: sed命令行格式为: sed [-nefri] ‘command’ 输入文本/文件 常用选项: -n∶取消默认的输出,使用安静(silent)模式。在一般 sed 的用法中,所有来自 STDIN的资料一般都会被列出到屏幕上。但如果加上 -n 参数后,则只有经过sed 特殊处理的那一行(或者动作)才会 阅读全文
posted @ 2013-09-07 18:10 emanlee 阅读(121899) 评论(4) 推荐(5)
摘要: 错误:eclipse+pydev 配置出错,就是在选择python interpreter那一步:See error log for details.com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: ... 阅读全文
posted @ 2013-08-17 18:30 emanlee 阅读(640) 评论(0) 推荐(0)
摘要: Suppose we have a file contains the following information, termed input_file:A 0B 1C 21.Read file one per line(1):while read linedo printf ... 阅读全文
posted @ 2013-08-09 15:31 emanlee 阅读(806) 评论(0) 推荐(0)
摘要: 编译简单的C程序 C语言经典的入门例子是HelloWorld,下面是一示例代码: #includeintmain(void){ printf("Hello,world!\n");return0;} 我们假定该代码存为文件‘hello.c’。要用gcc编译该文件,使用下面的命令: $gcc-g-Wallhello.c-ohello 该命令将文件‘hello.c’中的代码编译为机器码并存储在可执行文件‘hello’中。机器码的文件名是通过-o选项指定的。该选项通常作为命令行中的最后一个参数。如果被省略,输出文件默认为‘a.out’。 注意到如果当前目录中与可执行文件重名的文件已 阅读全文
posted @ 2013-07-13 14:48 emanlee 阅读(4243) 评论(0) 推荐(0)
摘要: #include #include void randomlize(int *a, int n){ int i = 0,j = 0, k = 0; for(i = 0; i < n; i++) { j = rand()%(n-i)+i; k = a[i]; a[i] = a[j]; a[j] = k; } }int main(void){ int i; int a[]={1,2,3,4,5,6,7,8,9}; randomlize(a,9); for(i = 0; i < 9; i++) { printf("%d ",a[i]); } return ... 阅读全文
posted @ 2013-07-13 08:52 emanlee 阅读(2431) 评论(0) 推荐(0)
上一页 1 ··· 207 208 209 210 211 212 213 214 215 ··· 337 下一页