mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
8 lines
269 B
Bash
8 lines
269 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
#跳转到指定脚本
|
||
|
sed '{/first/b jump1; s/This is the/No jump on/; :jump1; s/This is the/Jump here on/}' test
|
||
|
|
||
|
#跳转到开头,删除每一个逗号,并保证删除最后一个逗号之后,跳出循环
|
||
|
sed -n '{:start; s/,//1p; /,/b start}' test
|