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.
tee: duplicate standard input
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".
No , but it should be redirected to c.txt
The data of both a.txt and b.txt should be redirected to third text file.
As i am giving input to a & b , it should be redirected to c.txt simultaneaously.
The method above shows redirecting output a.txt -> b.txt.
a.txt -> b.txt
Are what you need "a -> c and b -> c" or "a -> b -> c".
a -> c
b -> c
a -> b -> c
Both case can be derived from the above command with the similar idea.