|
|
楼主 |
发表于 2008-10-6 17:05:39
|
显示全部楼层
连载七
大家如果使用了本人在顶楼提供的sed,会发现其帮助信息是纯英文版的,实际上现在网
上能找到的sed版本,其帮助信息都是没有经过翻译的,于是,本人特将其帮助信息进行
了汉译整理并对照如下(不能说是翻译,因为有的信息直译过来根本是讲不通的)Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
用法:sed[选项]...{脚本-如果没有其它脚本}[输入文件]
-n, --quiet, --silent
-n, --安静模式
suppress automatic printing of pattern space
禁止自动输出模本空间(意即将输出定向到由命令控制)
-e script, --expression=script
-e 脚本,--表达式=脚本
add the script to the commands to be executed
添加脚本的命令将被执行(-e是个命令连接开关,在第二个-e前第一个-e后的命令将首先被执行完,意即执行完一条命令后再执行后面的命令)
-f script-file, --file=script-file
-f 脚本文件
add the contents of script-file to the commands to be executed
从文本中读取命令并执行
-i[suffix], --in-place[=suffix]
-i[后缀]
edit files in place (makes backup if extension supplied)
在符合条件的文本行后添加指定内容(之前是-a)
-l N, --line-length=N
-l N,--线长度=N
specify the desired line-wrap length for the `l' command
用-l N语法来指定线(字符数,循环次数,行数)长度
-r, --regexp-extended
-r, --表达式延展
use extended regular expressions in the script.
扩展脚本中的正则表达式
-s, --separate
-s,--分割替换
consider files as separate rather than as a single continuouslong stream.
将文本行分割为单独的字符串来进行替换
--text switch to text mode
--text 切换到文本模式
-u, --unbuffered
-u,--无缓冲
load minimal amounts of data from the input files and flushthe output buffers more often
从输入文件中加载数据并保持输出的刷新(非常用语法)
--help display this help and exit
--help 显示帮助信息
-V, --version output version information and exit
-V, --版本 输出版本信息
If no -e, --expression, -f, or --file option is given, then the firstnon-option argument is taken as the sed script to interpret. All remaining arguments are names of input files; if no input files arespecified, then the standard input is read.
如果没有-e开关,表达式,-f开关,或者给出的文件选项,那么将会首先输出sed脚本的帮助信息,如果仅仅是后面没有输入文件,那么程序将会接收使用者键盘输入的指令。
E-mail bug reports to: bonzini@gnu.org .
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
报错电子信箱:bonzini@gnu.org。
请务必在邮件(标题)中注明“sed”“来自于那个领域”的关键词。
[ 本帖最后由 batman 于 2008-10-6 17:08 编辑 ] |
评分
-
查看全部评分
|