From: Joe Beanfish on 15 Mar 2010 14:27 On 03/14/10 19:21, Clark Smith wrote: > This is not strictly Linux-only, but maybe somebody in this forum > can provide pointers. > > I am looking for a code to do the following: > > 1) Loop over all of the URLs in my bookmarks database. > > 2) For each URL try and establish a connection. > > 3) If the connection succeeds move on to the next URL. > > 4) Otherwise increment the number of times that attempting to > connect to this URL has not succeeded. > > 5) If this number is greater than some preset value then remove > this URL from my bookmarks database. > > Ideally, this would be a shell-script that I would from cron at > specified intervals. > > Anybody know if such a thing (or similar) exists? > Unless you want all your bookmarks to go away when you lose connectivity you'll want to include a general "am I online" check before doing any other checks and removals. Aren't the firefox databases single-user? As in not safe to use, or especially modify, while firefox is running? Also, I've encountered sites that go offline for substantial periods of time then come back as before. For various reasons: DNS/Domain issues, overload from being mentioned in the news, ISP issues, etc. Maybe you just want to flag or rearrange "bad" urls?
From: Phred Phungus on 16 Mar 2010 23:18 Bit Twister wrote: > On Sun, 14 Mar 2010 18:15:21 -0600, Phred Phungus wrote: >> Bit Twister wrote: > >>> Years ago I pulled my bookmarks into an ascii file. >>> Now I add keywords + url to the file. I use a script to grep it for >>> keywords. Example: >>> >>> $ urls bash doc >>> http://tldp.org/LDP/abs/html/index.html ! bash script advanced documentation >> BT, I'm doing something similar with my linuxlog. Can you post the script? > > Nope. It is an ambidexterous script, and here is a link you can use. > http://groups.google.com/group/alt.os.linux.mandriva/msg/fabb730cdb3912db?dmode=source Laying eyes on the script does not dissuade me from thinking that I want it too. urls bash doc urls is an executable. If I'm right there, then I get that part. What else happens in this command? -- fred
From: Bit Twister on 17 Mar 2010 01:29 On Tue, 16 Mar 2010 21:18:52 -0600, Phred Phungus wrote: > Bit Twister wrote: >> Nope. It is an ambidexterous script, and here is a link you can use. >> http://groups.google.com/group/alt.os.linux.mandriva/msg/fabb730cdb3912db?dmode=source > > Laying eyes on the script does not dissuade me from thinking that I want > it too. > > urls bash doc > > urls is an executable. More like a, link to an executable. Actual executable is ux. > If I'm right there, then I get that part. What > else happens in this command? Nothing. Basically, the ux script figured out it's executes the urls) section of the case statement, take the 2 command line arguments and create the command grep -i bash /site/doc/urls | grep doc and executed it. That assumes you have a file of urls with keywords in the /site/doc/ directory and you had done a ln -s ux urls If you did a ln -s ux urgb you could do a urgb blue and you would see all the different shades of blue you could use with any X Window application. Example on my system: $ urgb blue | wc -l 87 indicates there are 87 color definitions containing blue. Lets pick the first 3. $ urgb blue | head -3 240 248 255 alice blue 240 248 255 AliceBlue 25 25 112 midnight blue Now I can do a xterm -bg "midnight blue" -fg white
First
|
Prev
|
Pages: 1 2 Prev: found out why NOT latest kernel in debian..:-) Next: who maintains the man pages? |