From here. The key is:
get the PID by using the “cut” command on the output of the “jps/ps” command and send the PID to the “kill” command.
- The original commands.
- The one line command.
jps | grep Bootstrap | cut -d' ' -f1 | xargs kill -15