LoginSignup
3

More than 5 years have passed since last update.

Tab文字(0x09, HT)をgrepしたい

Last updated at Posted at 2014-02-27
sample.txt
string=AAA[Tab文字]AAA

みたいなファイルがあって、Tab文字をgrepしたいときのメモ。
そのまま Tab を押すと、
カレントディレクトリのファイルがぴろぴろーっと表示されるだけだもんね。

■手順
CTRL+V → Tabキー で、sh へTab文字を渡せる。

■結果


[docokano@unbabafedora html]$ echo 'AAA        AAA' | grep '   ' --colour=auto
AAA     AAA
[docokano@unbabafedora html]$ echo 'AAA        AAA' | od -xc
0000000    4141    0941    4141    0a41
          A   A   A  \t   A   A   A  \n
0000010

できた。やったね!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3