teip

Mask input to help commands process only selected parts

brewmacoslinux
Try with needOr install directly
Source

About

Masking tape to help commands "do one thing well"

Commands

teip

Examples

Replace only the second field in a CSV$ cat data.csv | teip -f 2 -d ',' sed 's/old/new/'
Uppercase only matched regex groups$ echo 'hello world' | teip -g 'world' tr '[:lower:]' '[:upper:]'
Process only specific lines matching a pattern$ cat log.txt | teip -l 'ERROR' sed 's/ERROR/FIXED/'