You are viewing a single comment's thread from:
RE: [USEFUL] Cryptocurrency exchange arbitrage script source code [BASH]
Whoa, cool script! And very well/cleanly written.
Why did you use hard coded file names instead of something like WFILE=$(mktemp)
YFILE=$(mktemp)
etc?
A small note for Ubuntu users, you'll also need the html2text and jq packages installed.
Thank you very much for your comment :) I'm afraid I don't know how to work with mktemp files in the bash. I will definitely look this topic & learn it for my future use, thanks @not-a-bird !
NP.
Essentially, you just invoke
mktempand it creates a file and returns that file's name. So you can use it anywhere you'd use a hard-coded file name.So by doing
WFILE=$(mktemp)you get something like/tmp/tmp.CqOZSJZb5yin yourWFILEvariable. So where you deal with wfile it would look something like this:You could do it for wfile, yfile, efile...
Sorry if I over-explained that.