开发者

Redirect sed output to tr

开发者 https://www.devze.com 2022-12-27 04:10 出处:网络
How do I redirect the output of a sed command as 开发者_JAVA百科input to a tr command?use pipe line \"|\"

How do I redirect the output of a sed command as 开发者_JAVA百科input to a tr command?


use pipe line "|"

sed ... | tr -d '...'


You don't need tr. The y map predicate can do transliteration from within sed.


Looking at your comment, you say that the output of your sed command is on multiple lines. If it truly is on multiple lines, and not a wrap around, you could use a for loop

for i in $(sed ".."); do tr "$i"; done 
0

精彩评论

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