Google search from command line / Поиск в Google из коммандной строки


Vaulter аватар

Vaulter - Posted on 02 Февраль 2010

##
# Perform google search from command line
# @author Andrey Zakharov <http://vaultsoft.ru/ru/node/112>
# @code
# $ g well linux c%2b%2b engineer
# @endcode
# @TODO url decode
g() {
    if env | grep -q DISPLAY; then
        env x-www-browser "http://www.google.com/search?hl=${LANG%%_*}&q=$*" &
    else
        env www-browser "http://www.google.com/search?hl=${LANG%%_*}&q=$*"
    fi
}

1
Ваша оценка: Ничего Рейтинг: 1 (1 vote)

так же посмотри в сторону man sensible-browser и apt-cache show surfraw

##
# Lightweight replace for (The Killar of) surfraw
# Perform google search from command line
# 2010 Andrey Zakharov <aazaharov81 ONTO gmail com> 
# @code
# $ g well linux c%2b%2b engineer
# @endcode
# @TODO url decode
g() {
#http://www.google.com/search?hl=${LANG%%_*}&site=&q=sed&btnG=Поиск&lr=
    sensible-browser "http://www.google.com/search?hl=${LANG%%_*}&q=$*"
}

я так понимаю что www-browser и x-www-browser тоже только debian-base.
нет?