News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.

Subscribe to News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors. feed
News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.News, articles, tips and tools covering shell scripting and command-line interfaces of all flavors.
Updated: 25 min 36 sec ago

How to create a filtering function in shell please ?

Mon, 09/17/2018 - 16:07

I'm very interested in shell, I'm trying to create a custom command that unifying these two commands :

customComandFile :

VAR = pidof < $1 = program> ps -p VAR -o etime=

But the commands pidof appears to rerturn several pid sometimes like in the case of Nginx process. How to make my command filtering the smallest return number in the pidof function in order to retrieve only the master process ? thanks

submitted by /u/JoonDoe
[link] [comments]

smenu 0.9.14 is out

Wed, 09/05/2018 - 04:46