From: Bit Twister on
On Tue, 15 Jun 2010 08:20:49 -0700 (PDT), srikanth wrote:

> The browser is not killing instead it is opening all URLs in new tab.

You are correct. My fault for not testing what you are doing.

You were correct in a previous reply to one of my post where you
changed xdg-open to actual browser. Here is my working test case.

#!/bin/bash
_url_fn=t.data

while read -r url ; do
xdg-open "$url" &
sleep 4
pkill -u $USER firefox
done < $_url_fn
From: John Kelly on
On Tue, 15 Jun 2010 15:44:39 +0000 (UTC), Bit Twister
<BitTwister(a)mouse-potato.com> wrote:

>On Tue, 15 Jun 2010 08:20:49 -0700 (PDT), srikanth wrote:
>
>> The browser is not killing instead it is opening all URLs in new tab.
>
>You are correct. My fault for not testing what you are doing.
>
>You were correct in a previous reply to one of my post where you
>changed xdg-open to actual browser. Here is my working test case.
>
>#!/bin/bash
>_url_fn=t.data
>
>while read -r url ; do
> xdg-open "$url" &
> sleep 4
> pkill -u $USER firefox
>done < $_url_fn

But you can't be sure each url will open within 4 seconds, it may take
longer. He needs to explain what he is trying to accomplish. It sounds
strange to me.




--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: Bit Twister on
On Tue, 15 Jun 2010 15:50:25 +0000, John Kelly wrote:

> But you can't be sure each url will open within 4 seconds, it may take
> longer.

You are absolutely correct.

Having followed this thread from the beginning that is not going to be
the only problem which will arise.

> He needs to explain what he is trying to accomplish. It sounds
> strange to me.

I agree. So far I see no rational for the script. Only benefit I see
so far is a learning experience.
From: srikanth on
On Jun 15, 8:26 pm, John Kelly <j...(a)isp2dial.com> wrote:
> On Tue, 15 Jun 2010 08:20:49 -0700 (PDT), srikanth
>
> <srikanth0...(a)gmail.com> wrote:
> >On Jun 15, 9:48 am, Bit Twister <BitTwis...(a)mouse-potato.com> wrote:
> >> On Mon, 14 Jun 2010 21:09:24 -0700 (PDT), srikanth wrote:
> >> > Is there a way to kill the browser after each iteration?
>
> >> Put the browser in the background and use pkill to kill the browser.
>
> >> while read -r url ; do
> >>   xdg-open "url" &
> >>   sleep 2
> >>   pkill $USER xdg-open
> >> done <$1
>
> >The browser is not killing instead it is opening all URLs in new tab.
>
> Why do you want to open all these urls with a script?  What is your
> objective?
>
> --
> Web mail, POP3, and SMTPhttp://www.beewyz.com/freeaccounts.php

I want to run these urls to test the site data crawling. That's why I
am giving lot of URLs to browse.
From: srikanth on
On Jun 15, 8:58 pm, Bit Twister <BitTwis...(a)mouse-potato.com> wrote:
> On Tue, 15 Jun 2010 15:50:25 +0000, John Kelly wrote:
> > But you can't be sure each url will open within 4 seconds, it may take
> > longer.  
>
> You are absolutely correct.
>
> Having followed this thread from the beginning that is not going to be
> the only problem which will arise.
>
> > He needs to explain what he is trying to accomplish.  It sounds
> > strange to me.
>
> I agree. So far I see no rational for the script. Only benefit I see
> so far is a learning experience.

Yes, I am just experimenting this way which and how it will helps to
my work. If am going in a wrong way please correct because i am not
expert in shell and commands. Also is there any books which can i
refer for these types of stuff. Right now i am going with some shell
scripting books.