Shell script to open a URL

后端 未结 6 1054
既然无缘
既然无缘 2021-02-01 13:51

How do I write a simple shell script (say script.sh), so that I can pass a URL as an argument while executing?

I want a browser to start with the page opened on that URL

6条回答
  •  余生分开走
    2021-02-01 14:33

    In MacOS, just open works. So, open "$1" will open the passed URL in Chrome, if Chrome is the default browser.

提交回复
热议问题