1

I am failing to download the below website using wget in bash:

wget --wait 1 -x -H -mk https://bittrex.com/api/v1.1/public/getorderbook?market=usdt-btc&type=sell 

I have found some similar issues in other questions, however, their solution was to use -mk, which makes no difference here. The prompt just freeze after the command and nothing happens. If I try to open the same website in a browser, it will open normally. I would be grateful for any help here.

2
  • 3
    Quote your url! (especially the & character is special to the shell). Commented Dec 24, 2017 at 16:27
  • Very primitive mistake. Thank you for that! Commented Dec 24, 2017 at 17:05

1 Answer 1

2

As already pointed out in a comment, you need to quote your URL.

The & in the URL is putting wget --wait 1 -x -H -mk https://bittrex.com/api/v1.1/public/getorderbook?market=usdt-btc into the background and causes everything after the & to be interpreted as a command, which can be a great risk depending on the URL!

If your URL contains a $ you should use single-quotes (') to pass the string literally without variable expansion, otherwise double quotes (") are fine.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.