Re: wget

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Michael Havens
Date:  
To: Main PLUG discussion list
Subject: Re: wget
my brain is smoking! I guess I will do it one at a time then.

:-)~MIKE~(-:

On Tue, Jan 27, 2015 at 1:51 PM, James Dugger <>
wrote:

> Sorry the Shebang is wrong on the bash script it should be:
>
> #!/usr/bin/env bash
>
> On Tue, Jan 27, 2015 at 1:45 PM, James Dugger <>
> wrote:
>
>> Todds answer is perfect as long as the filenames to be downloaded are
>> explicitly named. However the image files that you are downloading are
>> named based on a query string and are hashed with filename that is longer
>> than the allowable character limit of a filename in Linux. So the wget
>> will fail. You need use the -O option which allows you to rename the file
>> as you download it but it can only be used for a single file not
>> recursively.
>>
>> you could do this for a single file case:
>>
>> $ wget -O new_image_name.jpg http://url-to-image-name
>>
>> Normally the -r and -A options will add a numerical suffix if it
>> encounters another file with the same name, however option -O turns
>> suffixing off, so it is only good for one file at a time. You could write
>> a small bash script to handle it:
>>
>> #!usr/env/bin/ bash
>>
>> while read -r image
>> do
>> output=`echo $image | cut -c 1-50`
>> wget "${image}" -O "${output}"
>> done < ./images.txt
>>
>>
>> On Tue, Jan 27, 2015 at 1:05 PM, Michael Havens <> wrote:
>>
>>> Todd.... I am so glad I asked the question. I wondered if there was a
>>> way to do the 'A' option. Now I know! So cool.
>>>
>>> :-)~MIKE~(-:
>>>
>>> On Tue, Jan 27, 2015 at 12:26 PM, Todd Millecam <>
>>> wrote:
>>>
>>>> wget -r -A jpg -P /tmp/
>>>> http://sites.google.com/site/thebookofgimp/home/chapter-2-photograph-retouching/
>>>>
>>>> will put them all in /tmp/
>>>> sites.google.com/bookofgim/home/chapter-2-photograph-retouching
>>>>
>>>> On Tue, Jan 27, 2015 at 12:12 PM, Michael Havens <>
>>>> wrote:
>>>>
>>>>> H0w can I us wget to retrieve the photos here
>>>>> <http://the-book-of-gimp.blogspot.com/p/chapter-2-photograph-retouching.html>.
>>>>> I tried:
>>>>>
>>>>> wget -r
>>>>> http://the-book-of-gimp.blogspot.com/p/chapter-2-photograph-retouching.html
>>>>>
>>>>> but it didn't download the pictures. It downloaded a bunch of web
>>>>> pages.
>>>>> :-)~MIKE~(-:
>>>>>
>>>>> ---------------------------------------------------
>>>>> PLUG-discuss mailing list -
>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Todd Millecam
>>>>
>>>> ---------------------------------------------------
>>>> PLUG-discuss mailing list -
>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>>
>>>
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list -
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>>
>>
>>
>>
>> --
>> James
>>
>> *Linkedin <http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/>*
>>
>
>
>
> --
> James
>
> *Linkedin <http://www.linkedin.com/pub/james-h-dugger/15/64b/74a/>*
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss
>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss