Tagged Questions
1
vote
1answer
101 views
How to split the HTTP error code from the contents in cURL?
Yes, this is related to Getting curl to output HTTP status code? but unfortunately not the same.
In a script I would like to run:
curl -qSfsw %{http_code} URL
where the -f option ensures that the ...
0
votes
1answer
36 views
Get Directory/file structure without payload
I need to recursively retreive the file/directory structure of an FTP server, getting only file names (without payload).
Can you help me how to do this (curl, wget, ...)?
The result should be the ...
0
votes
1answer
123 views
Downloading and extracting a .tar to a specific directory
I want to download a tar of a git repo and extract its contents to another folder.
The following line (broken up for clarity) works:
curl -L -0 nt-dotfiles.tar.gz ...
0
votes
4answers
92 views
Simple script parsing text, what is wrong here?
I'm a big user of https://www.grc.com/passwords.htm to get strong passwords. However, having to go to the site and manually copy the password every time gets old fast, so I decided to do a little ...
0
votes
2answers
178 views
cURL or xargs: show progress
I am using cURL to download many files and concatenate them to STDOUT. About 100,000 small files. I would like to see progress against the 100,000. Is this possible with curl or by using curl into ...
2
votes
1answer
190 views
How to make alias/function in .bash_profile for `curl` that takes an argument?
I found this tip super helpful, for using curl to resume an interrupted file copy.
The full syntax is:
curl -C - -O file:///Volumes/path/to/file
I would like to add an alias or function called ...
0
votes
1answer
182 views
How to make curl reconnect after 60"?
Sometimes, curl freezes:
$ curl -O 'http://www.site.com/index.html'
www.site.com/index.html --> index.html
% Total % Received % Xferd Average Speed Time Time Time Current
...
0
votes
2answers
551 views
How can I curl the output of another command
I want to pass curl the output from awk
./jspider.sh http://www.mypage.com | grep 'resource' | awk '{print $4}' | curl OUTPUT_FROM_AWK | grep myString
How can I achieve this?!
1
vote
1answer
392 views
curl not uploading file to ftp
I am using curl to upload a file to ftp server. The same script is working on another system, but on this one after connecting to ftp it is not doing anything and connection times out. The detailed ...
0
votes
2answers
276 views
remote backup with curl/wget
I need to backup a clients server (source) from our mediatemple server (destination) and then add it into a git repository while ssh'd in.
What is the most efficient/fastest way to do so? wget? or ...
0
votes
2answers
393 views
bash: source from URL
In addition to my own computer, I sometimes use an Ubuntu cluster at my school. Rather than manually keep my .bashrc's in sync, I would like to make the school cluster's .bashrc source my personal ...
8
votes
3answers
7k views
cURL: how to suppress strange output when redirecting?
I'm trying to print just the verbose sections of a cURL request (which are sent to stderr) from the bash shell.
But when I redirect stdout like this:
curl -v http://somehost/somepage > /dev/null
...