除了操作单独的行外,sed还可以操作一个行范围。
In addition to operating on individual lines, sed can operate on a range of lines.
AlignAssignments随后查找它将对其进行操作的行范围。
AlignAssignments then locates the range of lines on which it will operate.
目前为止,我们已经看到了行地址、行范围地址和regexp 地址。
Up till now, we've taken a look at line addresses, line range addresses, and regexp addresses.
Uniq函数被声明为接受一个范围,因此只能调用一次,即使在缓冲区内的一个行范围上调用时。
The Uniq function is declared to take a range, so it will only be called once, even when invoked on a range of lines in the buffer.
可以使用一个初始的行范围调用任何标准的Vim命令(包括call),这将针对范围中的每一行重复一次命令。
You can invoke any standard Vim command-including call-with a preliminary line range, which causes the command to be repeated once for every line in the range.
如果数据库分区和范围分区一同使用,那么表内的行首先会跨数据库分区做散列处理,然后再在每个数据库分区中执行范围分区。
If database partitioning and range partitioning are used together, the rows in a table are first hashed across the database partitions and then range-partitioned within each database partition.
在此前的例子中,函数依赖于一个显式的命令范围或一个Visual模式选择来确定要进行处理的行,但是这个函数则直接计算它自己的行范围。
In earlier examples, functions have relied on an explicit command range or a Visual mode selection to determine which lines they operate on, but this function computes its own range directly.
一旦拥有了一个可以操作行范围的函数调用后,一个特别有用的技巧就是通过Visual模式(参见:help Visual - mode获得更多细节)调用该函数。
Once you have a function call that can operate on a range of lines, a particularly useful technique is to call that function via Visual mode (see: help Visual-mode for details).
一个区域包含某个范围中的行。
清单3中第一个一行程序有个问题:它会遍历整个文件,即使它已找到所需范围的时候。
A problem with the first one-liner in Listing 3 is that it will go through the whole file, even if the necessary range has already been covered.
清单4:更有效地打印数字范围中的行。
Listing 4: Printing a numeric range of lines more efficiently.
最后,如果范围涵盖了多个行(即a:lastline > a:firstline),函数将报告被更新的行的数量。
Finally, if the range covers more than a single line (in other words, if a:lastline > a:firstline), the function reports how many lines were updated.
known_hosts文件的格式已经超出了本文的范围,但是对每一行都使用一个以逗号分隔开的主机名会非常有用。
The format of the known_hosts file is beyond the scope of this article, but it is useful to take advantage of the comma-separated host names for each line.
服务器的所有命令都包括一个范围(起始行、起始列、结束行、结束列——所有0原点)。
All commands to the servers include an extent (start row, start column, end row, end column — all zero origin).
如果为提交范围指定一个值,那么该过程可能不会立即处理所有受影响的行,但是其间它必须为这些行计数,并执行一个COMMIT。
If you specify a value for the commit scope, then the procedure might not be able to process all affected rows at once, but it has to count the rows and execute a commit in between.
第二行将对调试器的连接限制在一个IP地址列表的范围内,这个列表在第三行中提供。
The second line restricts connections to the debugger to a list of IP addresses, which you provide in the third line.
最后,本文还介绍了数据过滤的基本知识,解释了如何显示匹配特定条件的或某个范围内的电子表格行或单元格。
It also introduced you to the basics of data filtering, explaining how to display spreadsheet rows or cells matching specific criteria or range constraints.
这两次危机在大范围内都被忽视,其中一个原因是大多数警报信号出现在银行的代理分行、支行及远端分支而不是母行。
One reason the approach of both crises was widely missed was that most of the warning signs were not at parent banks but in affiliates, subsidiaries and other murky offshoots.
向此行号加1将得出感兴趣的范围的起始行号,也就是说,具有相同缩进的第一个相邻行就作为当前行。
Adding 1 to this line number gives the start of the range of interest, namely, the first contiguous line with the same indentation as the current line.
对这一行为的解释不在本文的讨论范围内,但是我们需要处理这些误报才能可靠地检测何时可能出现降水。
This explanation of this behavior is beyond the scope of this article, but we need to deal with these false positives in order to reliably detect when a precipitation event is likely to occur.
那就是说,如果函数有确定的有效值集合或范围可作为参数,可以将检验参数是否有效的断言放在该函数代码的第一行。
That is, if a function has a certain set or range of valid values for its arguments, an assertion to this effect can be placed as the first line of code in the function.
对于一个地址或一个地址范围,可以在大括号{和}之间对命令进行分组,使这些命令只用于按范围选择的行。
Given an address or a range of addresses, you can group several commands between curly braces, {and}, to have these commands operate only on lines selected by the range.
我将在后面为您演示如何使用地址范围来控制将命令应用到哪些行——但是,如果不使用地址,命令将应用到所有行。
Later, I'll show you how to use address ranges to control which lines a command is applied to — but in the absence of addresses, a command is applied to all lines.
这样可以识别在项目整个运行时间中覆盖较少范围的区域,可以显示测试的什么位置需要按行展开有代码变更和增添新特征的区域。
This can identify areas of the project that achieve less coverage over time, to show where testing needs to expand in line with code changes and added features.
如果表是一个范围集群表(不支持行压缩),可以考虑将其变换为范围分区表(支持行压缩)。
If the table is a range clustered table (that does not support row compression), you can consider switching it to become a range partitioned table (that supports row compression).
数据分区也称为范围(当前DB 2只支持范围分区方案),一个数据分区包含一个行子集,这些行存储在与表中其他行集不同的地方。
A data partition, also referred to as a range (currently DB2 supports only a range partitioning scheme), contains a subset of rows that are stored separately from other sets of rows in the table.
一旦确定了赋值区域的位置和宽度,剩下的就是遍历范围中的行并相应地执行重新格式化。
Once the location and width of the alignment zone have been determined, all that remains is to iterate through the lines in the range and reformat them accordingly.
我们希望将查询的范围限制在包含邮政编码为“79081”的客户的行。
We would like to limit the query to rows that contain a customer whose zip code is "79081".
和原来一样,它们根据文本的当前缩进来定位需要对其的行的范围。
As before, they locate the range of lines whose assignments are to be aligned, based on the current indentation of the text.
和原来一样,它们根据文本的当前缩进来定位需要对其的行的范围。
As before, they locate the range of lines whose assignments are to be aligned, based on the current indentation of the text.
应用推荐