Skip to content

Instantly share code, notes, and snippets.

@denkiwakame
Created November 10, 2015 02:09
Show Gist options
  • Save denkiwakame/b346675c2b7354e81918 to your computer and use it in GitHub Desktop.
Save denkiwakame/b346675c2b7354e81918 to your computer and use it in GitHub Desktop.
google scholarで検索する
function scholar() {
local str opt
if [ $# != 0 ]; then # 引数が存在すれば
for i in $*; do
str="$str+$i"
done
str=`echo $str | sed 's/^\+//'` #先頭の「+」を削除
opt="scholar?q=${str}"
fi
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome http://scholar.google.co.jp/$opt #引数がなければ $opt は空になる
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment