开发者

What are ':a' and 'ta' in sed?

开发者 https://www.devze.com 2023-04-03 09:55 出处:网络
What are :a开发者_如何转开发 and ta in sed? Example: sed -e :a -e \'/\\\\$/N; s/\\\\\\n//; ta\'

What are :a开发者_如何转开发 and ta in sed?

Example:

sed -e :a -e '/\\$/N; s/\\\n//; ta'


The best sed manual.

t label is testing, which goes to label (in your case label is "a") is substitute was performed.


:a and ta are pair. ":a" fist makes a lable . if the sequence is completed before lable "ta",goto ":a" keep executing.Just like the loop.

0

精彩评论

暂无评论...
验证码 换一张
取 消