LoginSignup
7
4

More than 5 years have passed since last update.

Unix系(Mac,Linuxなど)で一括でファイルのタブを空白に変換するコマンド

Last updated at Posted at 2015-12-02
find . -name "*.cs" | xargs -IFILE sh -c 'expand -t4 FILE > temp;mv temp FILE'

これで、カレントディレクトリ以下のすべてのcsファイルのタブを、空白4つで置き換えれます。
対象のファイルを変更したい場合は、findのところの '*.cs'を変更してください。
空白の数を変えたい場合は、expandのところの'-t4'の数字を変更してください。

てか、MonoDevelopのデフォルト設定保存できるようにするか、デフォルトタブをスペース置換にして欲しい。

7
4
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
7
4