#unices

hackbyte@friendica.utzer.de

Now, for something completely different: (mid lenght post)

Years, actually decades ago, as i was a very young padawan, discovering and in tiny part shaping (a _VERY_ tiny part of) the early internet (world wide web way back then).

A unix guru gave his shine to me .. and told me a nice lesson, i never forgot, and with the help of the almighty internet relay chat (IRCNet) even was able to improve upon a tiny bit.

Way back then, you mainly had ps and top to list and manage your processes on a Unix based system.

Modern fancy stuff like killall didn't exist for a while, not to name pgrep even. (We're talking mid to late 90ies here).

So, this unix guru came over to me to tell me a nice trick for my linux boxes at home.. I won't repeat the original one, but will skip directly to the (just slighty) improved one;

It's a bash function called psg (procname)

psg () 
{
 /bin/ps xau | /bin/grep COMMAND\\\|$1 | /bin/grep -v grep
}

As you can imagine, psg stands for "ps grep". You can use it with the name of the process, the pid or even a part of its commandline to get exactly only processes listed which match your grep.

You don't need to remember any commandline parameters or anything at all (unlike pgrep) .. but just fire and forget, take what you get. (It's truly KISS-compliant;)

The "original version" i got told skipped the header from the ps command and just spat out the processes, but i liked to have the header preserved. So at some time i questioned people in #linux.de on IRCNet about how to improve the grep cmd(s) for that reason.

And here we are ... you're welcome to use psg anytime you want..... and preserve the lore! ;)

#Unix #Unices #Unixes #Linux #Retro #Retrocomputing #NextStep #Bash #Script #Lore #KISS #RandomShit ;)

P.s.: What i was shaping? Ouh shoot..... i was employed to write down early html (1.1) to implement the wet dreams of some few graphics designers from their macintosh with photoshop.... We didn't have frames .. but we had tables!! (yeah i know. ;))

hackbyte@friendica.utzer.de

just a funny retrospective memory...

Way back then, in the early to midst 1990ies, i had some #shell account on some random #bsd system out there in hamburg/germany, on the local telephone lines...

Additionally, i had the luxury of using a local "behördennetz" (governemt network) phone, which gave me access to local calls free of charge..

So i actually sat down, for some few days on end... to list up the contents of /bin, /sbin, /usr/bin and /usr/sbin, reading the #man #page for each and every command available in there...

Did i ever mention that i love #unices and the fact they won over the world overall? ;)

#retro #unix #retrospecive #unices #retrocomputing #RandomShit ;)

hackbyte@friendica.utzer.de

I think this needs to be said from time to time.

I love it that unices overall made the great and won to rule the online world in all it's facettes. ;)

Linux, BSD*, IOS/OSX(, QNX).. Whenever you go online, it is pretty sure, that at least one of them, if not more, are involved.

Regardless of what you actually do.

I just love it. ;)

#Unix #Linux #BSD #Unices #RandomShit ;)