替换命令使用户能够自动取代不想要的内容。
The replace command allows you to automatically replace it with something else.
寻找和替换命令对于发现和修改错误是非常有用的。
Thesearch and replace commands are useful for finding and fixing errors.
相关扩展包括替换命令和针对不同进程重定向信息的更好方法。
Extensions include better ways of substituting commands and redirecting information in and out to different processes.
替换命令会自动地用另外的字来替换所搜寻的那个字。
The replacecommand automatically replaces the word you search for withanother word.
执行db 2iupt命令来更新db2home目录并基于所安装db 2软件来相应地替换命令文件。
Issue the db2iupt command to update the db2home directory and replace the common files based on the installed db2 software.
不带反斜杠的第一个后引号终止命令替换。
The first backquote not preceded by a backslash terminates the command substitution.
由于别名是一种展开形式而不是替换,它使您可以继续向别名命令添加选项和参数。
Because the alias is an expansion and not a replacement, it enables you to continue adding options and arguments to an aliased command.
不同于绑定变量,替代变量在客户端加以处理,且其值会在提交执行命令之前被替换。
Unlike bind variables, a substitution variable is processed on the client side, and its value will be substituted before submitting the command for execution.
别名可以方便地配置一些命令以使用不同的默认值,或为某个命令提供可替换的名称。
Aliases are a handy way to configure some commands to use different sets of defaults or to provide an alternate name for a command.
我们还可以使用该命令替换给定行号的缓冲区中的文本,或者删除当前行中第一个出现的字符串。
We can also replace the text in the buffer at a given line number or remove the first occurrence of a string in the current line, using this utility.
使用它可以很容易地接受命令的可替换版本,这样就具有了允许缩写和国际化等优点。
Alternate versions of commands are easily accepted, which has the benefit of allowing for abbreviations and internationalization, among other things.
我们曾经在清单9中创建了一个强制制表符,您可以从中看到命令替换的例子。
You saw an example of command substitution in Listing 9 when we created a captive TAB character.
上面所做的称为“命令替换”。
如果省略了text且不存在要替换的现有文本值,更新命令就会失败。
If text is omitted and there is no existing text value to replace, the update command fails.
如果仅找到了一个匹配文件名,会将此文件名替换为队列名称,setmqaut命令将执行并失败,但不会有任何提示。
If only one file name matches, the file name is substituted for the queue name, and the setmqaut command is executed but fails silently.
sprintf函数包含一个runmqsc命令模板,上述值将替换模板中的值。
The sprintf function contains a template of the runmqsc command into which values are substituted.
还可以使用模式、替换和sed从命令行更改文本。
You can also alter text from the command line using patterns, replace, and sed.
用下载获得的文件的名称替换上一命令中的cdrom . iso。
Substitute the filename you download for cdrom.iso in the previous command.
如果xargs将要执行的命令包含有替换字符串,那么将使用参数替换它。
Wherever the replacement string occurs in the command you ask xargs to execute, it will be replaced by an argument.
例如,“ ! ”字符是历史扩展字符,bash通常将其替换为前面输入的命令。
For example, the "! "character is the history expansion character, which bash normally replaces with a previously-typed command.
可以使用CHANGE命令替换SQLBufferUtility中的特定字符串。
A particular string in the SQL Buffer Utility can be replaced using the CHANGE command.
传统的答案是打开编辑器、把inetd替换成cgi等,然后从命令行再次运行perl kill_inetd.pl 。
The traditional answer is just to fire up an editor, substitute cgi for inetd, and so on, and re-run perl kill_inetd.pl from the command line.
通过使用s命令并替换一个空替换字符,您可以删除尾随空格。
You can remove trailing blanks from a file by using the s command and substituting a null replacement.
注意,在以上命令中必须替换终端类型png的truecolor选项,这会覆盖gnuplot使用的默认颜色。
Notice that in the above command I had to replace the truecolour option to the terminal type png, which overrides the default colors gnuplot uses.
在第一个脚本中,我们使用s(替换)命令来将每一行中的小写‘a’替换为大写。
In the first one, we use the s (substitute) command to substitute an upper case for a lower case 'a' on each line.
您还会注意到,我们用' p '命令替换了'd '命令,如您所猜想的那样,这明确要求sed打印模式空间。
You'll also notice that we've replaced the 'd' command with the 'p' command, which as you might guess, explicitly commands sed to print the pattern space.
以下示例使用CHANGE命令将令牌firstnm替换为 firstnme。
The example below replaces the token firstnm with firstnme using the CHANGE command.
如果愿意,可以使用反撇号进行命令替换。
If you prefer, you can use the back-ticks for command substitution. It achieves the same result.
使用vi风格的“替换单个字符”命令将b替换为a(即单击r,然后键入A)。
Replace the B with a using the vi-style "replace single character" commands (that is, click r, and then type a).
可以在命令行上使用命令替换,但在脚本中使用它则更常见;您将在本系列的后续文章中更多地了解它和脚本。
Command substitution is used at the command line, but more frequently in scripting; you will learn more about it and scripting in later articles of this series.
应用推荐