Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to download about 100 packages so I'm using wget-list to make it easier. My question however, is once I've made the list (I assume it's in a .txt format), is there a way I can insert comments into it that wget will ignore? Something like this:

#This is a comment
http://someurl.com
http://anotherurl.com
share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

It doesn't look like it:

If --force-html is not specified, then file should consist of a series of URLs, one per line.

You could try HTML style comments: <!-- Comment --> - maybe those get interpreted as comments, although I wouldn't count on it.

You could also use the --force-html parameter and feed it HTML - a format in which you'd have all freedom to comment as much as you like. The downside is that it adds a lot of clutter:

<!-- This is a comment -->
<a href="http://someurl.com"></a>
<a href="http://anotherurl.com"></a>
share|improve this answer
    
Yeah HTML makes it way too messy. Thanks for the clarification. –  MaxMackie Apr 2 '11 at 13:01
add comment

You can pipe through grep or sed to remove comments:

grep -v '^#' ~/list.wget | wget -i- -c -B http://base.url.if_needed
share|improve this answer
add comment

Just put comments in your without notation, wget will simply pick them up as invalid URLs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.