The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [curl]

cURL is a CLI tool for issuing HTTP GET, POST, & PUT request.

Filter by
Sorted by
Tagged with
0
votes
0answers
25 views

301 error when checking nginx_status

Zabbix shows 301 error when trying to get nginx_status. This is how my zabbix.conf looks like: server { listen [::]:80; server_name 127.0.0.1; location /nginx_status { stub_status on; ...
0
votes
0answers
24 views

How do I use bash script to parse a JSON and run related commands according to the parsed results? [duplicate]

I have a JSON file (array) like this: [ {"name":"Joe","age":36}, {"name":"John","age":14}, {"name":"Linda","age":62} ] And I want to parse it in shell, analyzing every item in the array, then ...
0
votes
1answer
17 views

how to download specific pip version on linux redhat

we can download the latest pip as curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py % Total % Received % Xferd Average Speed Time Time Time Current ...
-5
votes
0answers
19 views

How to use curl to get something from the website [closed]

I'm trying to get some specific data from a website. How can i use curl and grep a particular string.
0
votes
2answers
21 views

Using an array of strings with spaces in bash - error messages “curl: could not resolve host”

I am attempting to write a script in bash that monitors certain aspects of a server, and sends a message to slack if it notices that something is wrong. However, I am running into a strange set of ...
0
votes
1answer
52 views

How to ignore first line of content in curl standard output? [duplicate]

When I use curl -s to access a text file, it will display the entire content. Is there any way to ignore the first line of content? Test text file link: curl -s https://raw.githubusercontent.com/...
0
votes
1answer
64 views

How to get remote file modification time and size from a shell script?

I have a Linux VPS, There are many HTML forms on it, as follows: <table> <thead> <tr> <th>ver</th> <th>link</th> &...
0
votes
0answers
12 views

curl: put file content on header

I need to send an http request using curl attaching a certificate into a header. The problem arises since I'm trying to send it setting it into command line: $ curl -X GET https://<url> -H '...
-2
votes
1answer
49 views

end curl command?

curl "https://dummy.net/v1/users/titles/privacy' > -XGET \ > -H ‘Referer:https://dummy.net/friday/?f’ \ > -H ‘Authorization:Bearer xxxxxxxxxxxxxxx’ \ > -H ‘User-Agent:Mozilla/5.0 (...
2
votes
3answers
36 views

Splitting a file into two variables for piping to one command

I have a JSON object. it has two fields; { href: string, filename: string }. I want to download a file from href, and set its name to $FILENAME.pdf. This happens in a loop How can I do that? ...
0
votes
0answers
117 views

NSS error and curl (35) SSL connect error

I've been banging my head on this one. When I curl $ curl -iv https://getcomposer.org/installer I get * About to connect() to getcomposer.org port 443 (#0) * Trying 142.44.245.229... connected ...
4
votes
2answers
104 views

Launching Multiple Queries With Bash Script

I have the following bash script (on this post): #!/bin/bash while read LINE; do curl -o /dev/null --silent --head --write-out "%{http_code} $LINE\n" "$LINE" done < infile > outfile infile: ...
0
votes
1answer
140 views

Parsing output from wget and grep using bash

I can get a url link and search for text that starts with file: but I'm having issues parsing it from there. Example: wget -qO- http://website.com/site/ | tr \" \\n | grep -w file:\* > output....
3
votes
1answer
105 views

How to get subject of gmail letter with curl?

I use curl in my Lua program to get new mail list. I am trying to send request like this local head_command = "curl --connect-timeout 30 -fsm 30" local server = "imap.gmail.com" local mail ...
1
vote
0answers
29 views

Redirect Curl Calls From Specific IP On Localhost

I've a node server that serves localhost:90, and we need to direct all curl calls from WITHIN the machine on 168.92.168.92 to localhost:90. How can this be achieved? Would this be using iptables? I ...
0
votes
1answer
22 views

How to use select to choose from x files, that contain lists, needed to run set of commands against, in this case curl

I have about 100 lists of URLs used for health checking (200, 300,400,500) but cannot figure out the terminology to ask the question. In advance, I apologize. I want to use a list to choose on of ...
-1
votes
2answers
35 views

Why is cURL running in a subshell? [closed]

On my CentOS 7 box, I run something like: $curl boxname:5000/page And the output is: $curl boxname:5000/page [1] 55068 $ curl: (6) Couldn't resolve host 'boxname' [1]+ Exit 6 curl ...
4
votes
2answers
79 views

Get city location from IP addresses inside a file

What a i need is to find the city associated with each IP address, I've stored them inside a file. For example, the file's content is: 99.203.11.34 99.203.11.37 99.203.11.47 99.203.11.51 99.203.11....
0
votes
1answer
48 views

batch curl request w/ https address txt file

I have multiple phones I am trying to obtain the up time for phones. I have enabled REST API for all phones and am looking to run CURL scripts to get the value of uptime. I have a script to get the ...
1
vote
2answers
31 views

Sed output before substitute

I am trying to do some sed operation while substituting output. The specific case is the following: with output Date:080910 111411 I want to only keep Date:XXXXXX and filter out the space with the ...
1
vote
1answer
65 views

Make curl not overwrite files but change the name automatically?

I have a file generated by discord with about 8000 lines of curl commands and most of them are similar to one another. The deal is I can't edit every line and add a different output statement to each ...
1
vote
1answer
39 views

How to grep multiple lines?

Grep understands this : curl https://api.coinmarketcap.com/v1/ticker/ | grep "clipper-coin" But not this : curl https://api.coinmarketcap.com/v1/ticker/ | grep "{*clipper-coin*}" The output I ...
2
votes
1answer
82 views

curl in non-interactive mode

I am trying to automate stuff which includes installing rust through curl https://sh.rustup.rs -sSf | sh . This is interactive and queries for user-input to choose from i.e. "1" "2" or "3". I am ...
1
vote
0answers
53 views

Why is “git pull” trying to use CURL_OPENSSL_3 while libcurl4-openssl-dev is installed?

When I run git pull I get the following error: git-remote-https: /usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found (required by git-remote-https) Why is git trying to use ...
0
votes
0answers
64 views

how to urlencode curl messages

i have script got error when curl message . i think have some problem with character "space" or other because when i tried skip space , script running normal. this is my script : #!/bin/env bash ...
-1
votes
1answer
28 views

curl still emitting progress info even with --silent option

I have this curl command: curl --silent -o- https://raw.githubusercontent.com/oresoftware/run-tsc-if/master/install.sh | bash || { echo "Could not install run-tsc-if on your system."; exit 1; ...
0
votes
1answer
25 views

curl with headers loop syntax issue

I'm trying to do some API REST requests with the curl loop command below. With a first list of URL (with REST request inside), this works perfectly, with a second one I get "curl: (3) Illegal ...
1
vote
2answers
1k views

How to install php7.2-curl on a Debian 10? It depends on libcurl3 that is not available

I need php7.2-curl. But on Debian 10 apt says that it cannot be installed due to a dependency with libcurl3. But libcurl3 cannot be installed (it gives me no reason). Must I rollback to Debian 9.9? ...
1
vote
1answer
47 views

Understanding fetching mutiple URLs and documents using curl

It's not clear to me how to fetch multiple documents using curl mainly because I do not fully understand the explanation in the curl documentation The curl documentation says: -o, --output <file&...
0
votes
0answers
72 views

Can't curl without port 80 open, but port 80 shows as open anyway

So I made a apache server and put a page up, and it should be accessible on port 80 (so default), and I should be able to curl it. Apache listens on port 80 (/etc/httpd/conf/httpd.conf) But when I ...
0
votes
0answers
30 views

Transfer multiple files using curl over TFTP [duplicate]

I have to copy files from a host computer(windows based) to a hardware (both are on the same network, the hardware is proprietary and have certain limitations). So , I run the TFTP server on the host ...
0
votes
1answer
42 views

How to import pgp keys from a search on an keyserver using curl?

Is there a standard method for searching and importing a pgp key using curl or wget? I was going through verifying the download with a gpg signed shasum256 file and encountered the problem of trying ...
2
votes
1answer
84 views

curl delete command won't work in scripted for loop

Is there any reason why a curl command won't work with variables? Here is my set up - I am not using real values as I can not expose client data and I have no test environment. You will notice that ...
0
votes
1answer
29 views

How can I extract status code digits from curl?

I am writing a plugin and I want to extract a status code from my curl request: curl -I localhost | grep HTTP; Right now I have % Total % Received % Xferd Average Speed Time Time Time ...
0
votes
1answer
183 views

Cronjob fetching JSON with cURL. Check if response isn't empty before writing to file

I'm running Ubuntu and got a simple cronjob fetching a remote JSON-file and (over)writing it to the server. */15 * * * * /usr/bin/curl -m 120 -s https://path/to/remote/json.json > /store/json/here....
0
votes
1answer
35 views

trim using sed to get the exact value from curl

I'm getting this string data from curl command {"password": [["passwordreal", "2035/01/01 00:00"]], "user": "user1", "address": "kobebkokoko.net"} How do I get passwordreal using sed? Example, ...
0
votes
0answers
32 views

Problem with the limit of requests api youtube v3 search

I execute the following command: curl -G https://www.googleapis.com/youtube/v3/search \ -d part="id" \ -d q="es-por-ti-juanes" \ -d maxResults="1" \ -d key="..........." \ -d type="video" \ -d ...
0
votes
2answers
63 views

Get web page complete data

I'm using busybox tools and I want to take all http links in a web page. I save an example link page by using curl or wget. However, it saves the page as html. How to do it with curl or wget commands? ...
-1
votes
1answer
55 views

how to download ebi fastq link via command line using wget/curl

I have loads of data (fastq) to download from ENA database. Example: ERS076383 ERS012262 ERS160574 ERS349280 etc Link to download via browser: https://www.ebi.ac.uk/ena/data/warehouse/filereport?...
0
votes
1answer
57 views

RH 7.5 Linux using curl with sftp to pull multiple files ending in a particular file extension

I am in a Red Hat Linux 7.5 environment. I am trying to write a curl script to pull/receive any file from a folder that ends with a particular file extension. Previously, I have written a script to ...
0
votes
0answers
82 views

Binary Output from Curl [duplicate]

When I executed the command: curl https://piwik.openstreetmap.org/piwik.php?idsite=1 I received a warning that binary output can mess up my terminal, which, yes it did having ignored the warning, so ...
0
votes
1answer
30 views

asus ac68 merlin curl ignore http_proxy

asus ac68 is a router. I have installed the latest firmware(merlin) 384.11. curl -V curl 7.64.1 (arm-unknown-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2r zlib/1.2.5 Release-Date: 2019-03-27 Protocols: ...
1
vote
1answer
532 views

Bash script curl input variable from command line

I would like to be able to pass in what environment when script is run. Like script.sh dev ($dev would populate appropriate URL in curl command in script). Maybe even print the environment as options ...
1
vote
0answers
82 views

Curl download speed restricted when down/uploading from stdin/stdout

I'm running 2 curl commands where one downloads all the data into stdout/in until the stack is filled and another uploading whatever is in it out but it seems like the speed is restricted. For the ...
0
votes
0answers
19 views

Automatically upload directory to dropbox in no time (whenever any changes done to that directory

I installed the following Script on my CentOS 7 terminal access. I'll use this script to upload specific directory from the Linux to dropbox. using the following command i can upload the directory ...
1
vote
0answers
31 views

After setcap on executable, curl_easy_perform throws out of memory error

I've cross compiled an executable to run on Debian Stretch that requires a specific version of cURL (greater than 7.56) to run, and needs specific capabilities during execution. So on the executable ...
1
vote
2answers
197 views

php curl not getting installed on Debian 8 [duplicate]

I am using linux debian 8. I have webmin/virtualmin installed and 1 domain is running over the server. Php version is 7.1. But, i can not run curl on my server. i tried to install curl but it throws ...
0
votes
4answers
49 views

how to capture IP address from info

by the following api we can get the info about master1/2 machines curl -sH "X-Requested-By: ambari" -u "admin"":""admin" -i http://192.23.39.2:8080/api/v1/hosts?fields=Hosts/host_name,Hosts/ip | ...
1
vote
1answer
19 views

Terminology used in the manual for the curl package

An extract from the manual for the curl package reads: Using --anyauth is not recommended if you are doing uploads from stdin, since it may require the data to be sent twice and the client must be ...
0
votes
2answers
51 views

Phantom binary installed with curl

I upgraded binary youtube-dl following this instruction. locate seems to find it, not ls, and it cannot be invoked. What is happening? /usr/bin $ sudo apt-get remove youtube-dl /usr/bin $ sudo curl -...