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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -