Libraryless. Click here for Pure Java version (2306L/17K/56K).
!7 p { Map<Int, S> procs = psPidsAndCommands(); Map<Int, S> p2 = filterMap(procs, func(Int i, S cmd) { cic(cmd, "pocketsphinx") }); for (Int pid : keys(p2)) print(pid + ": " + procs.get(pid)); if (empty(p2)) { print("No pocketsphinx processes found"); ret; } print("Press enter to kill processes: " + struct(p2)); focusConsole(); readLine(); unix_killProcesses(keys(p2)); sleepSeconds(1); procs = psPidsAndCommands(); p2 = filterMap(procs, func(Int i, S cmd) { cic(cmd, "pocketsphinx") }); print(n(p2, "process") + " remaining"); for (Int pid : keys(p2)) print(pid + ": " + procs.get(pid)); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009584 |
Snippet name: | Kill all instances of pocketsphinx |
Eternal ID of this version: | #1009584/14 |
Text MD5: | e39fc2d34e7ac4def99f880a00f4190c |
Transpilation MD5: | f73993bb6bf84ead4847c5d91c8b9503 |
Author: | stefan |
Category: | javax / unix |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-08-08 21:31:06 |
Source code size: | 654 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 540 / 695 |
Version history: | 13 change(s) |
Referenced in: | #1009587 - unix_killAll - performs case-sensitive search in commands |