Skip to content

Instantly share code, notes, and snippets.

@nchapman
Created May 12, 2011 20:17
Show Gist options
  • Save nchapman/969349 to your computer and use it in GitHub Desktop.
Save nchapman/969349 to your computer and use it in GitHub Desktop.
Convert tabs to spaces
# ruby expand.rb /path/to/files
Dir["#{ARGV[0]}/**/*"].each do |file|
if file =~ /\.(rb|scss|css|erb|sql|conf|html|js)$/
`expand -t 2 #{file} > #{file}.tmp`
`mv #{file}.tmp #{file}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment