mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 21:07:00 +00:00
add 'System' command
add pgrep for checking whether a process is running
This commit is contained in:
parent
60ed6bfba6
commit
dbd01d0d40
@ -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 New Issue
Block a user