开发者

Redirect sed output to tr

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜