Skip to content

Instantly share code, notes, and snippets.

@chartsai
Created June 15, 2016 15:36
Show Gist options
  • Save chartsai/90d188b271b1e98aa24e43d52cea91af to your computer and use it in GitHub Desktop.
Save chartsai/90d188b271b1e98aa24e43d52cea91af to your computer and use it in GitHub Desktop.
# Basic Shell cmd:
ctrl + r
ctrl + a / ctrl + e
ctrl + c
ctrl + w
ctrl + p / ctrl + n
tab-tab
# Useful tool
grep
find
ls
awk
sed
less
$ ls | xargs -n 1 | file
$ find ./ -name QQQ
$ find ./ -iname QQQ # ignore case
$ find ./ -regex “.*\(YYY\|ZZZ\).*"
$ find ./ -iregex “.*\(YYY\|ZZZ\).*” # ignore case
$ ... | awk ‘{print $1}’ | ...
$ … | sed -n 3p | ...
$ $(!!)
$ !abc
$ grep -E “.*/src/.*(java|aidl)"
$ grep -i | grep -v
$ git log —online | grep -v Merge
# Bonus:
diff / vimdiff
# Copy and delete specify lines including keyword
$ cat test.txt | grep -v Log >> test2.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment