i want to save the PID of a background process and save it to a file along with the process name in linux.
What is the command to do so?
Can anybody help me out?
i want to save the PID of a background process and save it to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I am not sure what you call the “process name” but in Bourne shells you get the PID of a background process with the shell variable
$!. For example: