0

How can I get just a specific part of the source code of a website without having to get the whole document with wget and then grep? I only need a small part and getting the whole source code causes a lot traffic.

Is there a possibility to stop reading the source code when I got the part I want? I just need the first few lines...

Joost
  • 3,169
  • 2
  • 22
  • 40
  • 1
    holes causing traffic? like potholes? – JWiley Jun 21 '12 at 14:35
  • 1
    Is this what you are looking for? http://stackoverflow.com/questions/5787213/is-it-possible-to-read-only-first-n-bytes-from-the-http-server-using-linux-comma – Joost Jun 21 '12 at 14:39

1 Answers1

0

You can add a call to head in your pipeline, to keep only lines at the head of the output.

unwind
  • 391,730
  • 64
  • 469
  • 606