In todays summer short Ken tells us about how you can grep for a tab in a file.
grep "first{ctrl+v}{tab}second" file.txt
for more information see http://www.linuxquestions.org/questions/linux-newbie-8/tab-in-bash-script-242400/#post4386714
Comments
Comment #1 posted on 2011-08-26T17:01:18Z by Krayon
Another way (in BASH)
Another way you can do this would be use the special $'string' expansion which is treated specially and expands string with backslash-escaped characters replaced as specified by the ANSI C standard (see under QUOTING of the bash(1) man page for more info).
You could therefore do something like this:
grep "first"$'\t'"second" file.txt
This is also REALLY useful for weird characters (it supports \nnn, \U (unicode)) etc and the like.
<< First, < Previous, Next >, Latest >>
Leave Comment
Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.
Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).