Libraryless. Click here for Pure Java version (6165L/38K).
1 | static L<Int> unix_killAll(S pattern, O... _) { |
2 | ret unix_killAll(func(S s) -> bool { containsWord_regexp(s, pattern) }, _); |
3 | } |
4 | |
5 | static L<Int> unix_killAll(final F1<S, Bool> f, O... _) { |
6 | Map<Int, S> procs = psPidsAndCommands(); |
7 | Map<Int, S> p2 = filterMap(procs, (i, cmd) -> f.get(cmd)); |
8 | for (Int pid : keys(p2)) |
9 | print("Killing " + pid + ": " + p2.get(pid)); |
10 | unix_killProcesses(keys(p2), _); |
11 | ret asList(keys(p2)); |
12 | } |
Began life as a copy of #1009584
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1009587 |
Snippet name: | unix_killAll - performs case-sensitive search in commands |
Eternal ID of this version: | #1009587/7 |
Text MD5: | 5142e6343fcadbf409ec882554dd7117 |
Transpilation MD5: | 00c26a6ac87813adb31e02537007a851 |
Author: | stefan |
Category: | javax / unix |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-22 15:25:12 |
Source code size: | 439 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 595 / 662 |
Version history: | 6 change(s) |
Referenced in: | [show references] |