I have command like this
command | tee /dev/tty | grep ...
that say prints
hello
world
I would like to change this so every line from the command output to be prefixed, in the output or it to looks, say:
# hello
# world
bash Process substitution might help
printf 'hello\nworld\n' | tee >(awk '{print "#"$0}' > /dev/tty) | grep hello
hello
#hello
#world
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With