Google search use in your Terminal on Kali Linux

hello, Want to use "Search on Google" in your Gnome Terminal? added the Google search support for it. See the code which is given below. add this code in your .bashrc file.

step 1.

root@Lh4cKg:~# vim .bashrc

function google { Q="$@"; GOOG_URL='https://www.google.de/search?tbs=li:1&q='; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}${Q//\ /+}" | grep -oP '\/url\?q=.+?&amp' | sed 's|/url?q=||; s|&amp||'); echo -e "${stream//\%/\x}"; }




step 2.

useage google search in terminal

google word1 word2 word3

root@Lh4cKg:~# google lgogua.blogspot.com



Thanks for reading

SHARE

About Lasha Gogua

    Blogger Comment
    Facebook Comment

5 comments:

  1. what theme do you use how did you get your desktop like that and you have an amazing blog many kudos please dont give up like other bloggers have

    ReplyDelete
    Replies
    1. hello, bro i use: window theme,icon theme : best-of-darkblue, conky-manager1.2 and cyborg theme, background : alienware image

      Delete
  2. There is a problem:

    usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
    [-e pattern] [-f file] [--binary-files=value] [--color=when]
    [--context[=num]] [--directories=action] [--label] [--line-buffered]
    [--null] [pattern] [file ...]

    ReplyDelete
  3. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

    Melbourne SEO Services

    ReplyDelete