Unix programming

Pipelines in C

Back in 2016, a question came up in one of the groups as to how you would code a pipeline in C. The requestor wanted C code equivalent to the shell pipeline

echo "Hello World" | tr "a-z" "A-Z" | sort | rev

Since I hadn't actually attempted before to write such a pipeline in C, I gave it a try. I came up with a couple of variations, which I never posted back to the newsgroup.

Recently, another question reminded me of my code. So, rather than let it moulder in my collection of coding bits, I post it here as a reference:

System Management: 
Subscribe to RSS - Unix programming