leopardysnow
Programmer
I have a text file url.txt with urls one per line. Something like:
...
If I put the following command in command line or in a shell script it works fine:
This simply prints out the content of urls.txt line by line
So now I want to go 'get' the images from the urls so I thought I could do something similarly with curl such as
but this isn't working.
What I thought this would do is substitue each url from url.txt in $0 so that I would be doing a
and so on.
Any ideas how to use curl with awk and use a variable instead of hardcoded http value(since my urls are coming from a text file)? Thanks.
...
If I put the following command in command line or in a shell script it works fine:
Code:
cat urls.txt | awk '{ print $0}'
So now I want to go 'get' the images from the urls so I thought I could do something similarly with curl such as
Code:
cat urls.txt | awk '{ curl --remote-name $0 }'
What I thought this would do is substitue each url from url.txt in $0 so that I would be doing a
Code:
curl --remote-name [URL unfurl="true"]http://www.something.com/image1.jpg[/URL]
Any ideas how to use curl with awk and use a variable instead of hardcoded http value(since my urls are coming from a text file)? Thanks.