Posts: 1,016
Thanks: 7
Thanked 56 Times in 51 Posts
what do you mean with "your own pid"? Each process running gets a process id (PID) from the system. If the process ends, you won't see it anymore (e.g. in ps) and logically there is no PID anymore.
Forgive me if this question seem stupid and wrong in how to explain.
I just want to run the same program but with many of profile in the same time. And then i will take its pid later to identify each running profile.
Example:
# myprogram profile1 &
# myprogram profile2 &
# myprogram profile3 &
How should i make this possible?
Posts: 1,016
Thanks: 7
Thanked 56 Times in 51 Posts
then just do sth like
Quote:
ps -aux | grep "yourprogrammcall"
And split the string (sry i am no bash expert for splitting strings ) and grep the pid for that progammcall.
Maybe you have to add an
grep -v "grep \"yourpgroammcall\""
so that the grep call does not exist in the output.
Recent comments
22 hours 9 min ago
1 day 7 hours ago
1 day 8 hours ago
1 day 11 hours ago
1 day 16 hours ago
1 day 16 hours ago
1 day 18 hours ago
2 days 4 hours ago
2 days 9 hours ago
2 days 11 hours ago