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'm doing this wget script called wget-images, which should download images from a website. It looks like this now:

wget -e robots=off -r -l1 --no-parent -A.jpg

The thing is, in the terminal when i put ./wget-images www.randomwebsite.com, it says

wget: missing URL

I know it works if I put url in the text file and then run it, but how can I make it work without adding any urls into the text file? I want to put link in the command line and make it understand that I want pictures of that certain link that I just wrote as a parameter.

share|improve this question
    
Just add a command line argument to your script and use that as the URL. –  Chris Oct 6 '10 at 12:53
add comment

1 Answer

You forgot to add the positional parameters to the wget call, i.e. "$@".

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.