grep -P "\t"
Not criticising the author here, as grep -P is good, but you might not also know that you can enter tabs and other codes in bash by pressing ctrl-v. So you could also type: grep "[ctrl-v]TAB" grep -P "\t"
Not criticising the author here, as grep -P is good, but you might not also know that you can enter tabs and other codes in bash by pressing ctrl-v. So you could also type: grep "[ctrl-v]TAB"You can also do $'\t' in at least Bash (and probably Zsh).
$ set -o vi; bind -q quoted-insert
quoted-insert can be invoked via "\C-v".:%s/Ctrl-Q[Enter]//g[RealEnter]
or replace each tab with 4 spaces:
:%s/Ctrl-Q[Tab]/[4 spaces]/g[RealEnter]
where [RealEnter] means an unquoted Enter.
This is mainly useful for making such changes in a single file (being edited) at a time. For batch operations of this kind, there are many other ways to do it, such as dostounix (and unixtodos), which come built-in in many Unixen, or tr, maybe sed and awk (need to check), a simple custom command-line utility like dostounix, which can easily be written in C, Perl, Python, Ruby or any other language that supports the command-line interface (command-line arguments, reading from standard input or filenames given as command line arguments, pipes, etc.).