651 B
651 B
| title | seo_description | date | draft | snippet_types | |
|---|---|---|---|---|---|
| percol to pick lines | How to use percol to pick lines mid pipe | 2023-05-16T15:37:29+02:00 | false |
|
Deep in a emac tutorial I discovered this hidden gem.
"percol adds flavor of interactive selection to the traditional pipe concept on UNIX."
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" >}}