Shell脚本:用于打印句子的命令

时间:2017-05-17 02:47:47

标签: shell

我找不到在shell脚本中打印句子的命令。 例如在谷歌上

firefox http://www.google.com    
[[command that writes "hello world" on the searchbar]]

结果应为https://www.google.com/search?hl=en&source=hp&biw=&bih=&q=hello+world&btnG=Google+Search&gbv=2&gws_rd=ssl

应该很容易,但我无法找到它

2 个答案:

答案 0 :(得分:0)

根据firefox手册,您可以添加此选项:

-search term
     Search for term with your default search engine.

如果您的默认搜索引擎是Google,则此命令将起作用:

firefox -search "hello world"

答案 1 :(得分:0)

您可以将q查询参数直接提供给search中的URL

firefox "https://www.google.com/search?q=hello+world"