iselectprovides an up-down list, (as input from a prior pipe), in which the user can tag multiple entries, (as output to the next pipe):# show some available executables ending in '*sh*' to run through `whatis` find /bin /sbin /usr/bin -maxdepth 1 -type f -executable -name '*sh' | \ iselect -t "select some executables to run 'whatis' on..." -a -m | \ xargs -d '\n' -r whatis
Output (after taggingafter pressing the spacebar to tag a few on my system):
dash (1) - command interpreter (shell)
ssh (1) - OpenSSH SSH client (remote login program)
mosh (1) - mobile shell with roaming and intelligent local echo
yash (1) - a POSIX-compliant command line shell
vipeallows interactively editing (with one's favorite text editor) what goes through a pipe. Example:# take a list of executables with long names from `/bin`, edit that # list as needed with `mcedit`, and run `wc` on the output. find /bin -type f | grep '...............' | EDITOR=mcedit vipe | xargs wc
Output (after deleting some lines while in mcedit):
378 2505 67608 /bin/ntfs-3g.secaudit
334 2250 105136 /bin/lowntfs-3g
67 952 27152 /bin/nc.traditional
126 877 47544 /bin/systemd-machine-id-setup
905 6584 247440 total
Note on push & pull: iselect starts with a list in which nothing is selected. vipe starts with a list in which every item shown will be sent through the pipe, unless the user deletes it.
iselectstarts with a list in which nothing is selected.vipestarts with a list in which every item shown will be sent through the pipe, unless the user deletes it.
In Debian-based distros, both utils can be installed with apt-get install moreutils iselect.