Below is a small, tiny Fish shell function that, when ran, notifies you of the price of IRR against USD. For example:
$ get-irr2usd
> USD <-> IRR XCHG Price: 1036862IRRIt does not have any parameters, but it takes one extra step, and saves the result of your query into a file specified by the GET_IRR2USD_LOG_FILE environment variable. You can set this variable in $XDG_CONFIG_HOME/fish/config.fish. On most distributions, this is equivalent to ÷/.config/fish/config.fish.
If you are a Fish user, you probably know that already? I don't need to tell ya. But for the sake of closure, wget(1) get-irr2usd.fish into $XDG_CONFIG_HOME/fish/functions. If you have even the least wrinkliest of brains, you might already have deduced that, on most distros, it's equivalent to ~/.config/fish/functions.
Another way to do so is, to copy and then paste the function from your browser, into your terminal, then press Enter, then type in funcsave get-irr2usd and you are golden.
This function could be useful as a cronjob. But remmeber to replace $GET_IRR2USD_LOG_FILE with an actual, absolute path. Like ~/misery.log.
You may ask, why I am not saving the logs in a machine-friendly format, like CSV. Well, that's because I want it to be human-readable. Parsing the file is pretty simple if your brain is not full of worms.
Install Linux.
No.
Screw you. I am just sharing a function. Visit my profile for +70 projects, big and small. I am mostly active in systems programming, and PLT (Programming Language Theory).
Disocrd: .chubak
Telegram: @rapturemaster