0

I run cowsay, which asks me to input text string. Then, it prints the result to stdout.

I want to redirect that result to zwrite instead of stdout.

The issue is that I can't do cowsay | zwrite because after I run cowsay, it runs in REPL asking me to input the argv , then it prints the result to stdout. In this case, I can't think of a way to redirect its output.

2

You can use:

echo "some text"|cowsay

To redirect the output of cowsay you can use:

echo "some text"|cowsay > /tmp/cowsay.out

or

echo "some text"|cowsay|zwrite user
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.