Class: RoCommands::Processes
- Defined in:
- lib/ro_commands/processes.rb
Instance Method Summary collapse
Methods inherited from Base
describe, method_added, meths, usage
Methods included from Bash
#_bash, #bash, #bash_lines, #bash_per, #handle_path
Instance Method Details
#kill(keyword) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/ro_commands/processes.rb', line 4 def kill(keyword) `ps aux | grep #{keyword}`.split("\n").each do |process| puts process pid = process.scan(/\d+/).first bash "kill #{pid}" end end |