mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2024-11-26 06:30:17 +00:00
add 'System' command
add pgrep for checking whether a process is running
This commit is contained in:
parent
60ed6bfba6
commit
dbd01d0d40
1 changed files with 3 additions and 0 deletions
|
@ -1935,6 +1935,9 @@ pidof sublime_text
|
||||||
#pgrep, you don't have to type the whole program name
|
#pgrep, you don't have to type the whole program name
|
||||||
pgrep sublim
|
pgrep sublim
|
||||||
|
|
||||||
|
#pgrep, echo 1 if process found, echo 0 if no such process
|
||||||
|
pgrep -q sublime_text && echo 1 || echo 0
|
||||||
|
|
||||||
#top, takes longer time
|
#top, takes longer time
|
||||||
top|grep sublime_text
|
top|grep sublime_text
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue