add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
24
old_snippets/choose-over-awk.en.md
Normal file
24
old_snippets/choose-over-awk.en.md
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: "choose over awk"
|
||||
seo_description: Why I use choose instead of awk now days.
|
||||
date: 2024-03-04T11:52:22+01:00
|
||||
draft: false
|
||||
snippet_types:
|
||||
- awk
|
||||
- choose
|
||||
---
|
||||
|
||||
Sometimes typing out `awk '{print $1}'` just takes too long. Today I decovered [choose](https://github.com/theryangeary/choose?tab=readme-ov-file).
|
||||
It makes selecting a field from an output much faster.
|
||||
|
||||
Now instead of:
|
||||
|
||||
```shell
|
||||
$ gss | rg awk | awk '{ print $2 }' | xargs hx
|
||||
```
|
||||
|
||||
I run:
|
||||
|
||||
```shell
|
||||
$ gss | rg awk | choose 1 | xargs hx
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue