1

using wget to get the result of google translate

view story
linux-howto

http://stackoverflow.com – everybody. I want to write a bash-script to use the google translate from the terminal and translate the English into Chinese. My plan is first use the wget to translate the English,then use sed to get the result. So i use wget -qO- --header="Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header="Accept-Charset:GBK,utf-8;q=0.7,*;q=0.3" --header="Accept-Encoding:gzip,deflate,sdch" --header="Accept-Language:en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4" -U "Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.27 Safari/536.11" http://translate.go (HowTos)