From: srikanth on
On Jun 15, 8:44 pm, Bit Twister <BitTwis...(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

I have tried it before but no luck.. It is saying new tab opened in
same session and opening each url in new tab. But as per the script it
should kill the browser and launch for each url.
From: John Kelly on
On Tue, 15 Jun 2010 10:09:32 -0700 (PDT), srikanth
<srikanth007m(a)gmail.com> wrote:

>I want to run these urls to test the site data crawling.

Perhaps lynx is easier to script. Why must you use Firefox?


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

From: Bit Twister on
On Tue, 15 Jun 2010 10:14:22 -0700 (PDT), srikanth wrote:

> 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.

"going in a wrong way" is pretty vague.

You indicated the task was to test "this site's crawling abilities".
Your test does not stress the site's crawling abilities.
That task basically boils down to your Internet connection speed.


> Also is there any books which can i refer for these types of stuff.

If you keep watching you might figure out Chris F.A. Johnson
is pretty knowledgeable and has published a book.
http://cfajohnson.com/shell/


> Right now i am going with some shell scripting books.

I suggest book marking http://www.tldp.org/LDP/abs/html/index.html

The bash scripting is pretty easy to learn. What makes it more
powerful is calling other programs to the heavy lifting.

You learning which program to use for a specific task is what is going to make
you a better script coder.
From: srikanth on
On Jun 15, 10:35 pm, John Kelly <j...(a)isp2dial.com> wrote:
> On Tue, 15 Jun 2010 10:09:32 -0700 (PDT), srikanth
>
> <srikanth0...(a)gmail.com> wrote:
> >I want to run these urls to test the site data crawling.
>
> Perhaps lynx is easier to script.  Why must you use Firefox?
>
> --
> Web mail, POP3, and SMTPhttp://www.beewyz.com/freeaccounts.php

I need to browse those urls only in webbrowser because i need show the
cashed snapshots when user searches there webbrowser cache.
From: Bit Twister on
On Tue, 15 Jun 2010 10:21:45 -0700 (PDT), srikanth wrote:
>>
>> #!/bin/bash
>> _url_fn=t.data
>>
>> while read -r url ; do
>>   xdg-open "$url" &
>>   sleep 4
>>   pkill -u $USER firefox
>> done < $_url_fn
>
> I have tried it before but no luck.. It is saying new tab opened in
> same session and opening each url in new tab. But as per the script it
> should kill the browser and launch for each url.

Yes. previous attempt was untested.

The above script is what I used to verify that it works.

You need to change firefox to whatever browser you are using.