Use & (ampersand) in single line bash loop
I have been using this command successfully, which changes a variable in a config file and then executes a Python script within a loop:
I have been using this command successfully, which changes a variable in a config file and then executes a Python script within a loop:
I know that I can change the file a program writes to by interrupting the process in gdb, closing using the file descriptor and then re-opening with the file name I want. Is there a way to do the same thing at run time?
I am trying to understand named pipes in the context of this particular example.
What’s the difference between a process group and a job? If I type pr * | lpr then is it both a process group as well a job?
What exactly is the difference between a process group ID and a job ID?
Suppose, for example, you have a shell script similar to:
$ k=v p & [1] 3028 is there any way for p to change the contents of /proc/3028/environ to not mention k=v while p is still running? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them … Read more
I’m going through this book, Advanced Linux Programming by Mark Mitchell, Jeffrey Oldham, and Alex Samuel. It’s from 2001, so a bit old. But I find it quite good anyhow.
Say I have the following script:
In a VM on a cloud provider, I’m seeing a process with weird random name. It consumes significant network and CPU resources.
How can I get the pid of a subshell?