I made simple code in c:
#include <stdio.h>
int main( int argc, char* argv[] ) {
printf( "Hello, just wanted to say: %s.\n", argv[1] );
return 0;
}
and made two programs out of it - app1and app2.
Now I'm experimenting with pipelines:
./app1 Bye | ./app2
and the output placed in %sis equal (null)instead of the expected "Hello". Why?
source
share