Skip to content

Instantly share code, notes, and snippets.

@app2641
Last active Dec 19, 2015
Embed
What would you like to do?
ggrksシェル。 引数に検索語句を入れて実行するとChromeでGoogle検索を行う。 AND検索も可。
#!/bin/bash
if [ $# == 0 ]; then
echo "引数に検索語句を指定してください"
exit 1
fi
q=`echo $@ | sed -e 's/ /+/g'`
open -a Google\ Chrome https://www.google.com/search?q=$q
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment