in reply to passing a parameter to an outside program
I'm not clear from your question whether you want to only communicate at the end of the child process or while both are running concurrently. If the former is truly what you want, then the answers about backticks et al are appropriate. Environment variables are also fairly easy, but you can only use them when the programs are spawned from the same shell. IPC in a more general sense, through sockets or shared memory, is much more complicated but also much more powerful.
And, a caveat, all of the more powerful suggestions imply that you are on a *NIX system of one kind or another, not a Windows box.