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 -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -