How do I grep tab (\t) in files on the Unix platform?

22 s
22

The trick is to use $ sign before single quotes. It also works for cut and other tools.

grep $'\t' sample.txt

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *