Alex Rivera | Logout

grep a tab in UNIX

Asked 2009-12-01T11:23:13.213
571

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

Edit
Report

1 Answer

107

I never managed to make the '\t' metacharacter work with grep. However I found two alternate solutions:

  1. Using <Ctrl-V> <TAB> (hitting Ctrl-V then typing tab)
  2. Using awk: foo | awk '/\t/'
answered 2011-01-14T13:54:35.787

Your Answer