Not sure how to be honest. We know nothing about the part 1 or part 2 programs? Do they exist, or only in theory ? What programming language are they written in ? Can they be modified ? Can they be merged in one program ?
To be VERY generic, Linux allows piping the output from one program to the input of another.
Its as easy as writing this in the shell.
But EVERYTHING "part1" is printing out on standards out ( stdout ) is now entered as standard in ( stdin ) "part2"
https://thoughtbot.com/blog/input-outpu ... -the-shell