How do I grep
tab (\t) in files on the Unix platform?
tab-insert (M-TAB) Insert a tab character. This is because carriage return is ASCII 13, and M is the 13th letter of the alphabet, so when you type ^M , you get the 13th ASCII character.
Navigating Tabs in Linux Screen Creating new terminals/tabs in Linux screen can be done with Ctrl-a + c . To navigate to the previous window use Ctrl-a + p . To navigate to the next window use Ctrl-a + n . A list of other useful screen key bindings can be found at screen key bindings.
Answer: In Bash script, if you want to print out unprintable characters such as tab, you need to use -e flag together with the echo command.
The tab command reads the file specified by the File parameter or standard input, and replaces spaces in the input with tab characters wherever the tab command can eliminate one or more spaces. If you specify a file with the File parameter, the tab command writes the resulting file back to the original file.
If using GNU grep, you can use the Perl-style regexp:
grep -P '\t' *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With