Skip to content

Instantly share code, notes, and snippets.

@mayosuke
Last active October 12, 2015 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayosuke/3986667 to your computer and use it in GitHub Desktop.
Save mayosuke/3986667 to your computer and use it in GitHub Desktop.
command line memo
# hcidump -R の出力を改行無しにする
sudo hcidump -i hci0 -R | ruby -ne 'BEGIN{l = ""}; $_.strip!; if $_[0] == ">" then puts l; l = $_ else l << " " << $_ end'
# ruby one-liner
ruby -E UTF-8 -ne "print $_ if $_.include? 'hoge' or $_.include? 'fuga'" strings.xml
# gitリポジトリが管理するファイルのリスト表示
git ls-files
# gitリポジトリのログをツリー表示
git log --oneline --graph --decorate --all
# 現在のディレクトリにあるドットファイルを全て表示する。-inameは大文字と小文字を区別しない。
# refs: http://takuya-1st.hatenablog.jp/entry/20110918/1316338219
find . -iname '\.*' -maxdepth 1
#
find . | grep -v '\.git'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment