Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1689

highlight.bat - does exactly what it says, highlights text. Grep-ish functionality

$
0
0
It's easy to hightlight text with sed!

Code:
echo duck duck goose duck duck | sed '/goose/,${s//\x1b[1;33;41m&\x1b[0m/g;b};$q5'

So make a bat file out of it!

Code:
@echo off
sed '/%@UNQUOTE[%*]/,${s//\x1b[1;33;41m&\x1b[0m/g;b};$q5'

Then you can pipe stuff to highlight. So easy to remember! It's great if you get more grep results than you expect, but you still don't want to JUST return the 1 line you're looking for:

1685985877915.png



It's great for highlighting the secondary thing...

Read more

Viewing all articles
Browse latest Browse all 1689

Trending Articles