Added pure perl method

This commit is contained in:
MadCamel 2020-01-09 18:33:05 -05:00
parent ca1df2d948
commit c7adf256d8

View file

@ -40,6 +40,12 @@ Credit: @hakluke
:py3 import os,signal;from subprocess import check_output;os.kill(int(check_output(["pidof","vim"]).decode
('utf-8')),signal.SIGTERM)
```
## The pure perl way
```perl
:!perl -e 'while(</proc/*>){open($f, "$_/cmdline"); kill 9, substr($_,6) if <$f> =~ m|^vim\x00| }'
```
## The Rustacean's way
Credit: @wodny