While researching this article, I noticed that several online sed aficionados made reference to a GNU sed 3.02a.
几个在线sed爱好者提到GNU sed 3.02a。
All of these examples will be accepted by sed as valid addresses to appear on the left side of a command. Here are a few.
所有这些示例都将被sed作为合法地址接受,这些地址出现在命令的左边。
Because data can just as easily be piped to sed, it's very easy to use sed as part of a long, complex pipeline in a powerful shell script.
因为可以轻易将数据管道输出到sed,所以,将sed用作强大的shell脚本中长而复杂的管道很容易。
The Perl programming and scripting language (see Resources) is often used as a supremely powerful replacement for the tr and sed commands you've just looked at.
Perl编程和脚本语言(请参见参考资料部分)的功能非常强大,通常可用来取代前面介绍的tr 和sed 命令。
She had, when we were children, refused to take us to a seaside place because she heard it posses- sed a bathing box, but she loved the activities of a fishing village.
当我们还很年幼的时候,她不愿意带我们去海边的某个地方玩,因为她听说那里有更衣室;然而,她很喜欢渔村的活动。
Listing 4 contains a simple script using sed and awk to compress the output of ausearch down to only the non-duplicated (time omitted) executable and port number fields.
清单4包含了一个简单的脚本,它使用sed和awk将ausearch的输出压缩成只有不重复的(忽略时间)可执行程序和端口号字段。
GNU sed also doesn't suffer from many of the limitations that earlier and proprietary versions of sed had, such as a limited line length — GNU sed handles lines of any length with ease.
另外,GNU没有sed早期专门版本的很多限制,如行长度限制——GNU可以轻松处理任意长度的行。
When you run through the above, you'll find that the first four applications use the same regexp you used with grep in Listing 4, but the regexps for sed and vim are just a little different.
执行上面的步骤时,将发现前四个应用程序使用的regexp与清单4中的grep使用的完全相同,而sed和vim的regexp仅有一点差别。
Ma: First, the issue of how to look at each other has been a major topic of China-US SED from the very beginning.
马朝旭:首先关于如何看待对方的问题,从一开始这就是中美战略与经济对话探讨的重要问题。
Facts show that the SED has become a key platform for both countries to expand understanding, increase mutual trust and broaden cooperation.
事实证明,中美战略与经济对话已经成为双方扩大了解,增进互信,拓展合作的重要平台。
Paulson: First of all, in terms of their response, I think one of the benefits of the SED was that we had active engagement and built up a relationship of trust.
保尔森:首先,就他们的应对方式而言,我认为SED的好处之一就是,我们拥有主动的协商机制,并积累了相互之间的信任。
This design change is really handy, because if we want to compile another program instead of sed, we can simply create a new.ebuild file and pass it as an argument to our "ebuild" script.
这种设计更改确实方便,因为如果要编译另一个程序,而不是sed,可以简单地创建一个新的.ebuild文件,然后将其作为自变量传递给“ ebuild ”脚本。
A short Perl program, often typed directly on the command line, can sometimes do more than the equivalent tr or sed command line.
通常可以在命令行中直接输入简短的Perl程序,有时它可以完成比tr或sed命令行更多的操作。
As with many of the text commands we have looked at so far, sed can work as a filter or take its input from a file.
如同我们目前已经了解的许多文本命令一样,seb可以充当一个过滤器,或者从文件中获取其输入。
By using addresses, you can tell sed to perform edits only on a particular line or lines.
通过使用地址,可以告诉sed只对某一或某些特定行进行编辑。
So, from parsing the Twitter feed, you know that you need to pipe it through sed first to get a real, legible result.
通过解析Twitterfeed,您知道需要首先用 sed对它进行处理,以得到一个真正的、易读的结果。
Secondly, because sed is a stream editor, it can perform edits to data it receives from stdin, such as from a pipeline.
其次,因为sed是一种流编辑器,所以,它可以对从如管道这样的标准输入接收的数据进行编辑。
This example replaces only the first 'a', so in the second example, we add the 'g' (for global) flag to cause sed to change all occurrences.
这个例子仅替换了第一个‘a’,因此在第二个例子中,我们添加了‘g’(表示全局)标记,以使sed替换出现的所有小写‘a’。
Fortunately for us, for these types of situations, there is a better way — and the better way is called "sed".
幸运的是,对于这种情况,有一种更好的方法——这种更好的方法称为“sed ”。
Therefore, it's useful for editing command output or for when you're preprocessing a file with other tools — you can then pipe that text output straight to sed for quick editing.
因此,它对于编辑命令输出或对于使用其他工具对文件进行预处理非常有用——然后您可以将该文本通过管道直接输出给sed,以进行快速编辑。
Perl, while it did not replace any single language that was becoming stale, combined features of several little languages like sed, awk, and shell scripts, along with a lot of C-style expressions.
Perl虽然没有取代任何将要陈旧的单个语言,但是它组合了一些小语言,像sed、awk和shell脚本的特性,以及许多c风格的表达式。
Therefore, the failure in question could only happen if the executable running had a name under four characters (it was sed), and had no tag set.
因此,仅当正运行的可执行文件的名称在4个字符(一般情况)以下且没有设置标记时,才会发生失败。
Sed has a limited set of commands, but these combined with regular expression syntax and the hold buffer make for some amazing capabilities.
Sed提供了一组有限的命令,但是这些命令结合了正则表达式语法和保持缓存,因而实现了某些非常令人吃惊的功能。
In addition to operating on individual lines, sed can operate on a range of lines.
除了操作单独的行外,sed还可以操作一个行范围。
You can think of tr as a (very) simplified variant of sed: it will replace one character with another or remove some characters altogether.
您可以将tr看作为sed的(极其)简化的变体:它可以用一个字符来替换另一个字符,或者可以完全除去一些字符。
Uncompressing sed into a temporary directory.
将sed解压缩到临时目录。
A detailed tutorial on regular expressions is something for another article, but you'll take a quick look at some handy patterns for use with sed here.
本文并不打算详细地介绍正则表达式,但是在本文中,您将简单了解sed所使用的一些有用的模式。
A detailed tutorial on regular expressions is something for another article, but you'll take a quick look at some handy patterns for use with sed here.
本文并不打算详细地介绍正则表达式,但是在本文中,您将简单了解sed所使用的一些有用的模式。
应用推荐