Search Results

Search: Posts Made By: backslashV
2,517
Posted By backslashV
I'm not allowed to use pgrep.
I'm not allowed to use pgrep.
2,517
Posted By backslashV
Yes the script. ---------- Post updated at...
Yes the script.

---------- Post updated at 01:28 PM ---------- Previous update was at 01:27 PM ----------



If I assign this to an array, the PIDS won't be separated into indices.
2,517
Posted By backslashV
still prints the process itself.
still prints the process itself.
2,517
Posted By backslashV
Ok so the processes are as follows: csuser1 ...
Ok so the processes are as follows:

csuser1 13324 13306 -bash
csuser1 13783 13324 \_ bash
csuser1 13971 13783 \_ vim ff
csuser1 14000 13783 \_ vim ss

I am running the script...
2,517
Posted By backslashV
Please see my edit above.
Please see my edit above.
2,517
Posted By backslashV
would it be ok if I message you with my code? ...
would it be ok if I message you with my code?

[EDIT]: It appears that the problem was putting a # before the array name: ${#arrayOfChildren[0]}
removing that solved the problem. Still using ...
2,517
Posted By backslashV
Ok I solved the issue with the extra number. I...
Ok I solved the issue with the extra number. I had to grep out bash.

Now storing in the array doesn't work

for child in `ps -aef | grep $pid | grep -v grep | grep -v ps | grep -v $0 | grep -v...
2,517
Posted By backslashV
Thanks. I knew about that, but I need to use awk....
Thanks. I knew about that, but I need to use awk. Used --ppid before and that one also produces 3 where it should be 2.
2,517
Posted By backslashV
Question about awk
Hi,

I am printing the children of a process using this command:

ps -aef | grep 13783 | grep -v grep | grep -v ps | grep -v $0

and it shows the children correctly. (2 in my case)

The thing...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 11:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy