I've searched for a while but i can't either find an answer or come up with a solution of my own, so I turn to you guys. First question I actually ask here :)
I would like to run several instances of the same program, and redirect each of these programs' standard output to a file that contains that same process' pid, something like:
my_program > <pid of the instance of my_program that is called in this command>.log
I'm aware that this is not even close of the way to go :P I have tinkered around with exec and $PPID but to no avail. My bash-fu is weak :| please help me, point me somewhere! Thanks!