Auto close or overwrite browser tabs opened through the command line

I have a shell script creating an html page. It then opens in a web browser using simple syntax

opera result.html 

However, if I run this script several times, I get as many tabs / windows as it works. I tried loading another page containing a script that opens "result.html" to a specific target window, but this script page would not be closed using window.close () or self.close () [presumably because it was not javascript is open ...], so the script page is repeated ...

Is there a way for the web browser to open the file on the target using the command line or automatically close the window opened through the command line?

+4
source share
1 answer

What platform are you using? For Unix, there is a -activetab switch that you can use.

 opera -activetab result.html 

See Opera command-line options for various platform switches that may be appropriate.

+1
source

All Articles