Is there any way to grep interactively, meaning that I have a bunch of lines coming from somewhere that I want to pipe to further processing, with the option to manually specify the lines I want?
Consider this example:
#Name Food Music Adam Cake Rock Bert Fruit Folk Caesar Cake Rock Doris Cake Folk Emil Fruit Rock Francis Fruit Folk Gertrud Cake Rock ...
I can take this file and filter it using lines like
cat people.txt | grep -v "^#" | grep "^.*Fruit.*Folk"
...to get all people to invite to a veggie Folk party. When I automate this further:
cat people.txt | grep -v "^#" | grep "^.*Fruit.*Folk" | ??? | peopleInviterScript
...I want to have some
??? in the pipe that gives me the option to select/unselect people before the invitations are sent.
Is there already such a tool in bash/zsh I just do not know about?