Other How to get PID at startup

How would one get the PID of all processes or a group of proccess at start-up and write them to a list with FullPathName? So every time I open a new terminal, console, or application they will be written to a file by Script, C, C++ or Java.
 
Use ps, with the -G argument for groups, then you can pipe it to a file, with > myfile.txt.

ps(1)

Example:
ps -G operator > myfile

This doesn't fully answer your question, but it's a start.
 
Use ps, with the -G argument for groups, then you can pipe it to a file, with > myfile.txt.

This doesn't fully answer your question, but it's a start.
You did fully povided an answer to my question … This is all that I was after, and I never had a clue. I thought I had do did to deep.
Code:
ps -J0 > output_1
I got pleny of C++, Java and ASM readline code that I'm about to bring back the from the dead and translate from Windows to UNIX. You made my day sidetone. Shell programming is for the elite.
 
I never figure that shell scripting could be so simple:
Code:
ps -J0 > /root/Desktop/ps.G
pgrep libgtop-server
pkill libgtop-server
or
kill -s HUP 20383
How cool can it be. All I want to do is automate everything FreeBSD wise. Now I realize most of those type commands are already complied in lighting c thanks to BUILD_STATIC I thin. Now that I can see the c-structs, I now understand its relation to shell scripting. I can vision this in machine code (ASM). How awesome could it be to have a little bit of assembler code laying around for FreeBSD. After I get my taste of vnet the rest of this week, with basic networking out the way, it will be all about shell-scripting and asm for me. What I see that FSG and friends has done looks like fasm to me  I just wanted to say sidetone, its XMAS already...
 
I figured it was the answer directly from the command line, but I didn't know how much more work it would take to insert that into a script considering outputs and as variables.
 
Back
Top