I got this script that opens an .html
file, but I want to change it to only opening it if it isn't open yet.
Does anyone know some lines that have to be added in order to achieve this?
#!/bin/bash
fileFragment=$"*project/html/index.html"
fullPath=$(find ../ -path $fileFragment)
xdg-open $fullPath &
EDIT
I would like a generic solution which is why I kept the question so simple, it's not about browsers, it's about any file I opened usingxdg-open
, I already specified it by providing this example, I don't want to specify it anymore to specific browsers.
But if there is no easy generic solution then I'd rather have an answer for my specific case than none: So in my case I'm using firefox.
...
parts - and how do I 'use' lockfile from procmail? Do you mean I need tosudo apt-get install procmail
before being able to use that script? – Cold_Class Jun 10 '18 at 11:07