Created
November 10, 2015 02:09
-
-
Save denkiwakame/b346675c2b7354e81918 to your computer and use it in GitHub Desktop.
google scholarで検索する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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