Skip to content

Instantly share code, notes, and snippets.

@caprest
Last active August 23, 2018 05:40
Show Gist options
  • Save caprest/07d3fdcd368ea518c133e67894127598 to your computer and use it in GitHub Desktop.
Save caprest/07d3fdcd368ea518c133e67894127598 to your computer and use it in GitHub Desktop.
ワンライナーメモ

want to unzip certain files in a directory

$ for val in find . -maxdepth 1 -name "*.zip"; do unar $val ; done

Want to convert encoding of all files under the directory (e.g. *.c or *.h)

find . -type f -regextype posix-basic -regex ".*.[c|h]" -exec nkf -Lu -w --overwrite {} ; Lu convert to LF, Lw convert to CRLF -w convert to utf8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment