Technical questionAccepted answer
Downloading files with curl
Los
Mar 2
0 views1
I tried downloading the csv files from this repository from the command line of ubuntu 20.
What i have tried so far:
curl --output /home/../test2.csv https://cloudstor.aarnet.edu.au/plus/s/2DhnLGDdEECo4ys/download?path=%2FUNSW-NB15%20-%20CSV%20Files&files=UNSW-NB15_1.csv
However this creates a csv with unknown characters as input that can't be opened by excel ( if i download it from the browser everything is ok).
Any ideas?
1 answer
Accepted answer · original discussion
Mathieu
PermalinkMar 2
Your url https://example.net/xxx/download?path=yyy&files=zzz.csv contains a &, so your shell will cut the url on that character and try to download only https://example.net/xxx/download?path=yyy and launch curl in background.
To fix the problem, just use quotes ":
curl --output test.csv "https://example.net/xxx/download?path=yyy&files=zzz.csv"
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.