Skip to content

Commit c76b04d

Browse files
committed
utils: shell: awk clean blank
Signed-off-by: Luc Ma <[email protected]>
1 parent fa75c85 commit c76b04d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/_posts/utils/shell.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ pattern { action }
118118
...
119119
```
120120

121+
- `awk '{$1=$1};1'`
122+
- 将一个字段前后的空白(空格和 Tab) 全部清除
123+
121124
## sed
122125

123126
sed 和 awk 一样,都是按行处理文本的。

0 commit comments

Comments
 (0)