Skip to content

Instantly share code, notes, and snippets.

@gin0606
Created March 17, 2016 11:10
Show Gist options
  • Save gin0606/1f7a6fe9ecd38c996e57 to your computer and use it in GitHub Desktop.
Save gin0606/1f7a6fe9ecd38c996e57 to your computer and use it in GitHub Desktop.
ファイル末尾に改行入れるやつ。これは"*.rb"を指定してる
find . -name '*.rb' -type f -exec sh -c "tail -1 {} | xxd -p | tail -1 | grep -q -v 0a$" ';' -exec sh -c "echo >> {}" ';'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment