- 论坛徽章:
- 33
|
Where SED buffers data
SED maintains two data buffers: the active pattern space, and the auxiliary hold space. In "normal" operation, SED reads in one line from the input stream and places it in the pattern space. This pattern space is where text manipulations occur. The hold space is initially empty, but there are commands for moving data between the pattern and hold spaces.
hold space: 保留空间(内存缓冲区)
pattern space: 模式空间
sed在处理文件的时候,会把当前行存放在模式空间里面,每处理完一行,模式空间中的行就被送往屏幕,然后清空模式空间中的内容并把下一行再次放入。 |
|