percol to pick lines

16-05-23

%

Deep in a emac tutorial I discovered this hidden gem.

"percol adds flavor of interactive selection to the traditional pipe concept on UNIX."

project github

You can simply place it in the middle of a pipe and pick the options you want.

Example:

$ BUCKET="s3://cool-bucket" aws s3 ls $BUCKET | awk '{print $4}' | percol |sed "s;^;${BUCKET}/;" | xargs aws s3 rm
delete: ...

{{< asciicast-with-caption id="585386" title="demo" >}}

- [ percol]

all snippets