Read the man page, pgrep
and pkill
are the same program. Use pkill
to send a signal to one or more processes which you can select in the same way as pgrep
.
pkill -INT -f "python myscript.py"
See also this question and answer on unix.se (where this question would be a better fit).