Redirecting output of a C program as input of another program in Linux command shell -
i wrote program p1.c takes input linux command shell (using- char n=argv[1]). want character output of p1.c taken input of program p2.c . how can this? used command ./p2.out < ./p1.out t > output.txt. doesn't seem work 't' taken input p2.out , output written in output.txt.
use pipeline: ./p1.out t | ./p2.out
Comments
Post a Comment