Curl doesn't return csv file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Curl doesn't return csv file
# 1  
Old 02-26-2018
Curl doesn't return csv file

Hi every body,
I'm getting a trouble with my script , it's supposed to return a csv file .
Code:
 /usr/bin/curl -LS -D- -X GET -H "Authorization:Basic $password" -H 'Content-Type: text/csv' -L -o  $OUTPUT_FILENAME $url;

But I get an empty file with :
{"ErrorCode":1001,"ErrorMessage":"Incorrect login or password"}
Any issue ?
Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script containing Curl doesn't run with crontab

Hello I have a problem with the crontab command when I run a code containing Curl on the command line it runs without fail but as soon as I program it with crontab it executes everything except the curl returns fail thank you for helping me to resolve this problem because since Monday I look... (14 Replies)
Discussion started by: beautymind
14 Replies

2. UNIX for Beginners Questions & Answers

Remove newlines and carriage return from a csv file using UNIX

I need to remove new lines and carriage returns from csv file. Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
Discussion started by: A_Gaddale
3 Replies

3. Shell Programming and Scripting

Need Help to delete carriage return and new line in csv file

Hi All, I have a problem loading the data from a csv file As you see below in the Input ,For the Data starting with " there are 2 lines, which i want to make them into single without changing the format of that data. You can see the desired output below: While i try to open the csv file and... (4 Replies)
Discussion started by: mlavanya
4 Replies

4. HP-UX

Find command doesn't return in shell script.

Hi All, I am using below snippet to search for a string (read from a file 'searchstring.out') in all locations (/) and then iterate over the files found to write the locations and the respective owner to an output file. However, this doesn't work as I believe the find command doesn't exit's... (11 Replies)
Discussion started by: Vipin Batra
11 Replies

5. Solaris

uname doesn't return T5220 when it should

When I use the command uname -a I get the following SunOS SMSSC11 5.10 Generic_142909-17 sun4v sparc sun4v and not (from another system) SunOS SMSSC1 5.10 Generic_141414-07 sun4v sparc SUNW,Netra-T5220 Although this system is a T5220 as can be confirmed with prtconf snipit below System... (1 Reply)
Discussion started by: lankyG
1 Replies

6. Shell Programming and Scripting

curl doesn't work in browser

Hi I need once again you help guys, I have a php script that should call and url on the local-server, when i call the script from the browser it just prints the $str and it doesn't call the url, but when i execute the script from the shell (php sentdata.php) it works. I checked the apache... (6 Replies)
Discussion started by: tafil
6 Replies

7. Shell Programming and Scripting

Backing out of a script if command doesn't return any results?

Hello I have a script which emails identifies the user ID of a user and sends them an email. A user can enter part of the name of the person he/wants to send the email to. Then I use the ypcat command to identify the UID of that person. The problem I'm having, is building in an error trap... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies

8. Solaris

df command on Sol8 machine doesn't return a result

I have a sun4u system running Solaris 8. I tried running the df command but it returns a blank result. Also I'm unable to collect an explorer from this system as the OS complains that the disk is full. What could be going on here? (10 Replies)
Discussion started by: dperry1973
10 Replies

9. Shell Programming and Scripting

return a list of unique values of a column from csv format file

Hi all, I have a huge csv file with the following format of data, Num SNPs, 549997 Total SNPs,555352 Num Samples, 157 SNP, SampleID, Allele1, Allele2 A001,AB1,A,A A002,AB1,A,A A003,AB1,A,A ... ... ... I would like to write out a list of unique SNP (column 1). Could you... (3 Replies)
Discussion started by: phoeberunner
3 Replies
Login or Register to Ask a Question
CURLOPT_APPEND(3)					     curl_easy_setopt options						 CURLOPT_APPEND(3)

NAME
CURLOPT_APPEND - enable appending to the remote file SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append); DESCRIPTION
A long parameter set to 1 tells the library to append to the remote file instead of overwrite it. This is only useful when uploading to an FTP site. DEFAULT
0 (disabled) PROTOCOLS
FTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile"); curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); curl_easy_setopt(curl, CURLOPT_APPEND, 1L); curl_easy_perform(curl); } AVAILABILITY
This option was known as CURLOPT_FTPAPPEND up to 7.16.4 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_DIRLISTONLY(3), CURLOPT_RESUME_FROM(3), CURLOPT_UPLOAD(3), libcurl 7.54.0 March 06, 2016 CURLOPT_APPEND(3)