All Questions
581
questions
0
votes
0
answers
26
views
How to know where a process was launched on macOS when the parent is launchd? [closed]
Someone has accessed my computer and inserted a piece of code in it, which seems to run commands periodically. I know the process he launched, but I can't figure out where exactly it's running.
I ...
-1
votes
1
answer
89
views
How to get full username of process owner using ps
the title really says all I want to do, but there is a problem:
If I run ps aux | grep someRegexCondition I find the process I am interested in, but in the first column, where it tells me the process ...
0
votes
0
answers
68
views
Programatically send data to bash stdin
I want to programatically change user input in shell, similar to how complete shell built in achieves this.
So whenver you press TAB unix systems complete built-in appends some data to your input. I ...
0
votes
0
answers
25
views
Calling process inside Laravel always returns: command is not recognized on WIndows
Calling process inside Laravel always returns: command is not recognized on WIndows
I am trying to execute a bash file ,, and if i'm specified the full path to bash execute.sh,, then java is not found,...
0
votes
2
answers
122
views
Bash recursive function with for loop
In a root folder, I have a subfolder structure containing some mp3-files. I want to copy all subfolders and the mp3-files to an sd-card, which can be read by an mp3-player. Simply copying the entire ...
0
votes
0
answers
69
views
How to preserve a running command in the PyCharm terminal while shutting off PyCharm
How do you exit PyCharm and at the same time preserve a process that is running in a PyCharm terminal.
Background: I would like to restart PyCharm to make use of an updated plugin. However, I also ...
0
votes
2
answers
231
views
Shell script not killing nc process when quitting
I'm trying to create a simple honeypot using shell scripting. The script uses a while loop to keep a nc from stopping when the client closes the connection.
I wrote a function to kill all processes, ...
-2
votes
3
answers
4k
views
how to print a string with a variable by using echo command in the shell script
I defined a shell variable in the terminal and then used the echo command to output a string with that variable and it worked fine in the terminal.
But when I use the same command in a shell script, ...
0
votes
3
answers
79
views
How can I get the commands for all of the parents of a particular process with just the ps command?
I'm familiar with how to use these commands:
$ sudo ps -ef f
$ pstree
But they print the tree for every process.
I want just a list of the commands/arguments used for all the parents of the current ...
0
votes
2
answers
417
views
Bash process substitution in string
I'm trying to add a switch to a script which will make a parameter on an internal command optional. Normally, I'd do this by either using a conditional to run the command with the parameter or without ...
0
votes
1
answer
559
views
How can I wait for background processes to finish in Bash script - wait not working
The aim is to run two workloads concurrently, so each workload needs to be started in the background. Each of those workloads will have n workload processes running in the background (in the example ...
0
votes
2
answers
95
views
does bash promise to optimize -c into plain exec in simple cases?
Consider the following invocation of bash
bash -c 'sleep 99'
Suppose I run that, and while waiting for it to finish sleeping, I run ps in another terminal. In that case, I do indeed find sleep 99 ...
1
vote
1
answer
806
views
How to wait for a non-child process?
Currently I do:
while [ -d "/proc/$PID" ]; do
sleep 1
done
Since I cannot use wait as it is a non-child process.
The problem is that sleep blocks any signal trap handlers (for example ...
0
votes
1
answer
156
views
Tail vs sleep to wait on process
Currently I do:
while [ -d "/proc/$PID" ]; do
sleep 1
done
To wait for a process to exit. If I would replace it with:
tail --pid=$PID -f /dev/null
Would that be more efficient for the ...
2
votes
1
answer
524
views
Error checking the presence of a folder in a nextflow process
I'm trying to write a workflow using nextflow.
In my first process I need to create a folder to save all the file my process will create.
Here is my process :
params.fast5 = "/scratch/use/...