On Mon, Dec 15, 2014 at 11:20:39AM +0000, Joydeep Chakrabarty wrote:
contains -
#! /bin/sh
firefox -newtab "$@" || firefox "$@" &
I made it executable with +x option. Now when I run it using "./ff
www.yahoo.com", it always opens up my homepage(google). What am I doing
wrong here?
This isn't so much a Bash question as a Firefox question. Start with
the basics. If you type this command at a shell prompt:
firefox -newtab www.yahoo.com
what does it do? For me, it opens a new window (not a new tab) with
https://www.google.com/?gws_rd=ssl in the URL bar, and Google's front
page displayed.
This means that "firefox -newtab ..." is not the right command. You
need to find out what the right command IS, before you can put it in
a script.
https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
might be useful, or it might not. It was my first Google result for
"firefox command line parameters".