Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove numbers after decimal?! #35

Open
Dan1jel opened this issue Feb 14, 2021 · 5 comments
Open

Remove numbers after decimal?! #35

Dan1jel opened this issue Feb 14, 2021 · 5 comments

Comments

@Dan1jel
Copy link

Dan1jel commented Feb 14, 2021

Would wish there was an option to remove decimals and all numbers after. I'm not interested in the whole number because I'm having this in my tmux config.

Didn't see any option for this if this maybe is easy to implement?

@chubin
Copy link
Owner

chubin commented Feb 14, 2021

@Dan1jel Can you please give me an example? How it is now, and what you would like to have>

@Dan1jel
Copy link
Author

Dan1jel commented Feb 14, 2021

@Dan1jel Can you please give me an example? How it is now, and what you would like to have>

Sure, when i do
curl sek.rate.sx/1btc
I get
403744.714135

I would like it to be only 403744 because this is 403 thousand 7 hundred 44kr, and that's all I'm interested in.

I do have some bitcoins (0.00229537)

And this is not a huge amount, but i only interested in the hunders, not cents.

curl sek.rate.sx/0.00229537btc
Is
929.780626361

Should just be 929.

@chubin
Copy link
Owner

chubin commented Feb 14, 2021

This could be possible, but with a format option (not by default); think about curl btc.wttr.in/1sek. So probably something like:
curl btc.wttr.in/1sek?format=%2.3f would be good; what do you think?

@Dan1jel
Copy link
Author

Dan1jel commented Feb 14, 2021

I do use curl wttr.in/xxx?format=3 atm in terminal so that would be a good option.

@chubin
Copy link
Owner

chubin commented Feb 14, 2021

Very good! Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants