I have a C program that takes in 2 separate inputs through the read(0,buffer,size(buffer)) function. They take two different inputs. Is it possible, through bash command only, to pipe two pytho -c or perl -e scripts into the C program? Or do I have to change its source code? Thanks in advance
You can use a command group
{
echo "First command"
echo "Second command"
} | nl
Or on one line for your interactive editing convenience:
{ echo "First"; echo "Second"; } | nl
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