Send.c
Code:
#include <stdio.h>
int main(void) {
printf("I said moo!\n");
return 0;
}
gcc -Wall send.c -o send
recv.tcl
Code:
#!/usr/bin/tclsh
set handle [open "|./send" r]
puts "Just got [read $handle] from other process"
close $handle
chmod +x ./recv.tcl
./recv.tcl