For instance, to grep for "foo(tab)bar" I had to do the following:
tabChar=`echo -e '\011'`Here is a list of the octal values of a few special characters that may be handy.
grep "foo${tabChar}bar" < input
OCTAL | ESC'D | CTRL | DESCRIPTION |
007 | \a | Ctrl-G | Alert/Beep |
010 | \b | Ctrl-H | Backspace |
011 | \t | Ctrl-I | Horizontal Tab |
012 | \n | Ctrl-J | Newline (line feed) |
013 | \v | Ctrl-K | Vertical Tab |
014 | \f | Ctrl-L | Form Feed (clear terminal) |
015 | \r | Ctrl-M | Carriage Return |
033 | \e | Ctrl-[ | Escape |
047 | \' | Single Quote | |
134 | \\ | Backsplash |
I hope this list helps.
No comments:
Post a Comment