Im trying to write a very simple script. It should to open a web-browser (www.google.com for instance), wait for 3 seconds and kill the web-browser. What happens to me is that seems that the script do not pass from this first step.
#!/bin/bash
/usr/bin/google-chrome "http://www.google.com/"
echo "Hello"
sleep 3
pkill chrome
Not even showing the "Hello" in the terminal. Only the web-browser opens and no more happens.
What am I missing?
Thanks in advance.
google-chrome
process you started exits (this might happen immediately if there's an already running Chrome process, in which case yourgoogle-chrome
command will simply ask that process to open a new tab). You need to start it in the background for the script to be able to proceed to the remaining commands. – muru Oct 06 '22 at 12:09google-chrome
– PonJar Oct 06 '22 at 12:13