ncurses application to interactively filter input through pipe