Suppose there is a text file link in a webpage. Now I can use HTML builder to parse the page, extract that link, and download that file into a directory of my choice through WGET. But is it possible to do a check on the file prior to downloading it? I mean, like checking the first 6 letters to find whether it matches the sequence cooler, and if it does, only then download it?
Suppose there is a text file link in a webpage. Now I can use
Share
Read some of the file before downloading it?
You could use curl with its –range option to download part of the file. But you’d need to know enough about the file to skip any meta/header data I assume.
man curlnote, according to the man page: