I need to download a particular file from https://file_path
. Here is the curl command I use for that:
curl --user user:password "https://file_path?raw" > location
- I wish to download the real contents of the file at the above "file_path" location, but somehow the curl returns the HTML content only. How would I be able to fix this?
- When I run this command from the shell, it runs as above to download the HTML content. But when I run it from within a bash script, it does not download anything and returns a blank file. Why would it exhibit a different behavior depending on where its being run from?
real contents
and why an HTML source doesn't fit this requirement?