Skip to content

Instantly share code, notes, and snippets.

@s-hiiragi
Created June 15, 2016 20:14
Show Gist options
  • Save s-hiiragi/43c8d668059ffc7eb272868d6eafe6a1 to your computer and use it in GitHub Desktop.
Save s-hiiragi/43c8d668059ffc7eb272868d6eafe6a1 to your computer and use it in GitHub Desktop.
#!/bin/bash
# カレントディレクトリのすべてのファイルのTab文字をスペースに変換するワンライナー
find -maxdepth 1 -type f | grep -v "\.bak$" | while read f; do expand -t 4 "$f" > "$f.bak"; mv "$f.bak" "$f"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment