Created
December 22, 2013 07:00
-
-
Save anonymous/8079281 to your computer and use it in GitHub Desktop.
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 google() { | |
local str opt | |
if [ $# != 0 ]; then # 引数が存在すれば | |
for i in $*; do | |
str="$str+$i" | |
done | |
str=`echo $str | sed 's/^\+//'` #先頭の「+」を削除 | |
opt='search?num=50&hl=ja&ie=euc-jp&oe=euc-jp&lr=lang_ja' | |
opt="${opt}&q=${str}" | |
fi | |
/Applications/Chromium.app/Contents/MacOS/Chromium http://www.google.co.jp/$opt #引数がなければ $opt は空になる | |
} | |
alias ggl=google |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment