摘要: 1、说明 tr - translate or delete characterstr [OPTION]... SET1 [SET2]Translate, squeeze, and/or delete characters from standard input, writing to standard output.SETs are specified as strings of characters.tr 用来从标准输入中通过替换或删除操作进行字符转换。使用tr时要提供两个字符串:SET1用于查询,SET2用于处理转换。tr执行时,字符串1中的字符被映射到字符串2中的字符,然后执行转换操作。 阅读全文
posted @ 2011-09-26 21:01 浪里飞 阅读(671) 评论(0) 推荐(0) 编辑
摘要: 1、子程序仅会继承父程序的环境变量,子程序不会继承父程序的自定义变量。 自定义变量:通过export申明成环境变量 将环境变量转成自订变量:declare 环境变量=全域变量 自订变量=区域变量 2、read [-pt] variable 选项与参数: -p:后面可以接提示字符! -t:后面可以接等待的『秒数!』这个比较有趣~不会一直等待使用者啦! read -p "input... 阅读全文
posted @ 2011-09-26 17:58 浪里飞 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 2、wc [-lwm]选项与参数:-l :仅列出行;-w :仅列出多少字(英文单字);-m :多少字符;3、md5summd5sum [OPTION]... [FILE]...Print or check MD5 (128-bit) checksums.With no FILE, or when FILE is -, read standard input. -b, --binary read in binary mode -c, --check read MD5 sums from the FILEs and check them -t, --text read in text mode ( 阅读全文
posted @ 2011-09-26 15:37 浪里飞 阅读(1030) 评论(0) 推荐(0) 编辑
摘要: 1、说明 cut [option] files cut -d'分隔字元' -f fields 取出分字段的文件的某些特定字段 2、options -d:用来定义分隔符,默认为tab键,与-f一起使用 -f:需要取得哪个字段,根据-d的分隔字段 -c:以字符 (characters) 为單位取出固定字元區間;-c后面的值指定从第几个字符开始输出。 ... 阅读全文
posted @ 2011-09-26 11:39 浪里飞 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: 1、说明 split [-bl] file PREFIX 2、option 参数: -b:后面可接欲分割成的档案大小,可加单位,例如 b, k, m 等; -l:以行数来进行分割。 PREFIX :代表前置字元的意思,可作為分割檔案的前導文字。 3、示例 1)split -b 30b prime.cpp me 2)split -l 20 ... 阅读全文
posted @ 2011-09-26 11:10 浪里飞 阅读(26965) 评论(0) 推荐(0) 编辑
摘要: 通常,使用 cmp 命令比较非文本文件,使用 diff 命令比较文本文件。diff比较并显示文件中那些行不同,cmp比较并显示一行中那些字符不同。 1、说明 1)比较两个文件的内容并报告不同的第一个字符。 cmp [ -l | -s ] File1 File2 若不指定任何文件名称或是所给予的文件名为”-”,则cmp指令会从标准输入设备读取数据。 2)option -l 对... 阅读全文
posted @ 2011-09-26 10:08 浪里飞 阅读(892) 评论(0) 推荐(0) 编辑
摘要: 1、diff 1)Name diff - find differences between two files Synopsis diff [options] from-file to-file Description In the simplest case, diff compares the contents of the two files fr... 阅读全文
posted @ 2011-09-26 09:41 浪里飞 阅读(2901) 评论(0) 推荐(0) 编辑
摘要: 1、说明 NAME sort–sort lines of text files SYNOPSIS sort [OPTION]…[FILE]… DESCRIPTION Write sorted concatenation of all FILE(s) to standard output. 选项 ... 阅读全文
posted @ 2011-09-26 00:01 浪里飞 阅读(1637) 评论(0) 推荐(0) 编辑