Update README.md

This commit is contained in:
Luke Stephens (hakluke) 2019-09-30 23:43:44 +10:00 committed by GitHub
parent 5e80ff9323
commit 7cd50fcc64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,13 +8,6 @@ Credit: @tomnomnom
:!ps axuw | grep vim | grep -v grep | awk '{print $2}' | xargs kill -9
```
## The ps-less process tree way
Credit: @kpumuk
```
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
```
## The ps-less way
Credit: @tomnomnom
@ -29,6 +22,13 @@ Credit: @hakluke
:!find /proc -name status | while read file; do echo "$file: "; cat $file | grep vim; done | grep -B1 vim | grep -v Name | while read line; do sed 's/^\/proc\///g' | sed 's/\/.*//g'; done | xargs kill -9
```
## The ps-less process tree way
Credit: @kpumuk
```
:!grep -P "PPid:\t(\d+)" /proc/$$/status | cut -f2 | xargs kill -9
```
## The pythonic way
Credit: @hakluke