From: srikanth on
Hi All,
I need to browse some URLs in browser. Here I am having 600+ URLs to
browse. I have written a shell script to do this but the script is not
working properly. Here is my script.

#!/bin/bash
if [ -z "$1" ]
then
printf "Provide input text file to process the URLs\n"
exit 0
fi
{
for i in `cat $1`
do
echo "`xdg-open $i`"
done
}
exit 0

Here i am using xdg-open because it will open user set default
browser.
How can i open each URL one by one on same window? or tab. instead of
killing the browser and relaunching it. Even though it is fine like
browsing one url and kill that browser and relaunch it and browse next
url. is there any other commands which will do this magic?
Thanks in advance.
From: Sivaram Neelakantan on
On Mon, Jun 14 2010,srikanth wrote:

> Hi All,

[snipped 18 lines]

> Here i am using xdg-open because it will open user set default
> browser.
> How can i open each URL one by one on same window? or tab. instead of
> killing the browser and relaunching it. Even though it is fine like
> browsing one url and kill that browser and relaunch it and browse next
> url. is there any other commands which will do this magic?
> Thanks in advance.

Not knowing more about what you plan to do, maybe lynx could help?
That's a text only browser. and it uses a command file which you could
probably tinker with.


sivaram
--
From: John Kelly on
On Mon, 14 Jun 2010 08:34:47 -0700 (PDT), srikanth
<srikanth007m(a)gmail.com> wrote:

>Hi All,
>I need to browse some URLs in browser. Here I am having 600+ URLs to
>browse. I have written a shell script to do this but the script is not
>working properly. Here is my script.
>
>#!/bin/bash
>if [ -z "$1" ]
>then
> printf "Provide input text file to process the URLs\n"
> exit 0
>fi
>{
> for i in `cat $1`
> do
> echo "`xdg-open $i`"
> done
>}
>exit 0

a for loop is OK with a small number of elements, but when the data set
is large, a while read loop is better.


while read; do
xdg-open "$REPLY"
done <$1



>
>Here i am using xdg-open because it will open user set default
>browser.
>How can i open each URL one by one on same window? or tab. instead of
>killing the browser and relaunching it.

I don't think you can from a shell script.


>Even though it is fine like browsing one url and kill that browser
>and relaunch it and browse next


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

From: srikanth on
On Jun 14, 9:20 pm, John Kelly <j...(a)isp2dial.com> wrote:
> On Mon, 14 Jun 2010 08:34:47 -0700 (PDT), srikanth
>
>
>
> <srikanth0...(a)gmail.com> wrote:
> >Hi All,
> >I need to browse some URLs in browser. Here I am having 600+ URLs to
> >browse. I have written a shell script to do this but the script is not
> >working properly. Here is my script.
>
> >#!/bin/bash
> >if [ -z "$1" ]
> >then
> > printf "Provide input text file to process the URLs\n"
> > exit 0
> >fi
> >{
> >   for i in `cat $1`
> >   do
> >   echo "`xdg-open $i`"
> >  done
> >}
> >exit 0
>
> a for loop is OK with a small number of elements, but when the data set
> is large, a while read loop is better.
>
> while read; do
>     xdg-open "$REPLY"
> done <$1
John,
Here "$REPLY" means what?
>
>
>
> >Here i am using xdg-open because it will open user set default
> >browser.
> >How can i open each URL one by one on same window? or tab. instead of
> >killing the browser and relaunching it.
>
> I don't think you can from a shell script.
>
> >Even though it is fine like browsing one url and kill that browser
> >and relaunch it and browse next
>
> --
> Web mail, POP3, and SMTPhttp://www.beewyz.com/freeaccounts.php

From: srikanth on
On Jun 14, 8:55 pm, Sivaram Neelakantan <nsivaram....(a)gmail.com>
wrote:
> On Mon, Jun 14 2010,srikanth  wrote:
>
> > Hi All,
>
> [snipped 18 lines]
>
> > Here i am using xdg-open because it will open user set default
> > browser.
> > How can i open each URL one by one on same window? or tab. instead of
> > killing the browser and relaunching it. Even though it is fine like
> > browsing one url and kill that browser and relaunch it and browse next
> > url. is there any other commands which will do this magic?
> > Thanks in advance.
>
> Not knowing more about what you plan to do, maybe lynx could help?
> That's a text only browser. and it uses a command file which you could
> probably tinker with.
>
>  sivaram
>  --

I need to do in a browser. But lynx is an command line browser. So
that's why i am using xdg tool to do.