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
精彩评论