!7 p { Map procs = psPidsAndCommands(); Map 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)); }