Suppose we have two files, a.txt and b.txt . If we write anything in a.txt & b.txt, it should be redirected to c.txt.
tee may help for this purpose.
You may try a command like this:
echo "hello" | tee -a a.txt >>b.txt
Both a.txt and b.txt will contain the “hello”.
The method above shows redirecting output
a.txt -> b.txt.
Are what you need “
a -> c and
b -> c” or “
a -> b -> c“.
Both case can be derived from the above command with the similar idea.