LoginSignup
19
17

More than 5 years have passed since last update.

mac OSX で sedを使ってtabの文字列を置換

Last updated at Posted at 2013-09-11

MacOSX上でsedを利用して、tab文字の置換をやろうとして、つまづいたのでメモ。

sed -e 's/\t/\"\t\"/g' 20130911.tsv >> 20130911_2.tsv

とかしてみたけど、全然効かず。
いろいろやってみて効いた方法が

sed -e 's/<C-v><tab>/\"<C-v><tab>\"/g' 20130911.tsv >> 20130911_2.tsv

 C-v → Ctr-v
 tab → 普通にTABキー

これで実行したら出来た。
MacOS上だけなのかなー。

19
17
0

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
19
17