Getting lines from a website with GET and ack

Oh no, hourly smoke test failures in my inbox today! Looks like I put some bad HTML on work's website's home page, and every hour one of the automated tests, via Test::HTML::Lint, told me once an hour that

# HTML::Lint errors for http://devserver.example.com/
#  (72:53) <a> at (61:53) is never closed

Well, phooey, it's a PHP-driven website, so I can't open index.php and check lines 72 and 61. I can use GET, installed with LWP, to fetch the website and save the source:

$ GET http://devserver.example.com/ > foo.html
$ vim foo.html +61

but since I'm a Perl programmer, I want to be as lazy as possible by using the tools at my disposal. In this case, it's ack, and ack has the --line option to display ranges of lines instead of results of a regex. (Thanks to Torsten Blix for implementing this!)

$ GET http://devserver.example.com/ | ack --lines=61-72

So much nicer that way! and look at it in an editor, but how much easier to not have to do that.

Categories:

1 Comments

zkofjtelc said:


相关的主题文章:

All of which is a thought that rather pleases me:For of course as soon as the style takes off as a result of its obvious practicality then we’ll see a divergence of styles and colours and designs.Very much like the old days in fact.And wouldn’t that be fun? .


In other words, nearly all of the designers who are still appearing on the series as of today showed their clothes, so that we would not know who will be eliminated between now and the finale.So there will be no actual spoilers here(Well, maybe one, if you read between the lines);But because i know project runway fanatics consider any descriptions of the final looks spoilage, i will continue(And make some uneducated guesses)After the jump.You have been warned! .

There are several kinds of designer handbags await you to choose.Designer evening purses, fashion leather handbags, vogue tote bags, and other types.If you do really not what kinds they have, you can search on line.There are stores where we are a little tight on stocks.This isn't an alert.It's not serious.

Current bid:$16.00 Using Stock Libraries Styles In Website Design(Web designer's idea book:The latest themes, trends styles michael kors east west tote in website design)"/> Amazon Price:$6.60 List Price:$30.00 What Size/Resolution Images Do You Need For a Website?When you look for images for your website, you will want the resolution to be 72dpi.Most stock libraries will sell photos in two resolutions, 72dpi for websites and 300dpi for print.This is because a computer screen has only 72 dots per inch but a printing press will print documents at 300 dots per inch.

Sit up tall with both legs stretched out in front of you.Slowly bend at the hips and reach for your toes.To stretch tight hamstrings, alternate bending one knee, slightly lifting it off the ground while you press the other leg down.Shop fashion with a conscience at puravida, owned by two italian sisters, which produces michael kors coupon all its bright, easy-Wearing cotton and jersey clothes locally, and supports eco bali ventures(38b Jl Raya Seminyak).It also pays its staff fair wages with healthcare, as does buddha wear, which also locally manufactures gorgeous jerseys.Hot tip:Nip upstairs to riffle through buddha wear's bargain racks if you're on a tight budget(15X Jl Laksmana).

The idea for that brand candy striped webbing suited for gucci items, which were produced by horses saddles, got its start by guccio gucci inside the fifties.Associated with guccio guccis half dozen children, a number of were being daughter's exactly who competed sizeable functions inside gucci michael kors handbags on sale organization.When guccio guccie perished around 1953, many people founded knick nacks throughout ny, birmingham plus paris.

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on January 31, 2008 7:12 PM.

Put your work under version control today was the previous entry in this blog.

How to: Find all modules used in a tree is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.