Bash Shell Script Loop not processing more than one command -


here's loop:

#!/bin/bash count=3  in $(seq $count)    echo $i    killall midori    midori http://www.test.com/test.html?id=$i & done 

but won't kill midori , launch 1 in background continue loop. ideas?

it works want to, except you're killing midori within millisecond of starting it, before gets chance open window or anything.

try adding sleep give chance start , before kill it:

#!/bin/bash count=3  in $(seq $count)    echo $i    killall midori    midori http://www.test.com/test.html?id=$i &    sleep 10 done 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -