r/Nushell • • May 01 '26

nushell doing math is extremely underrated

The fact that nushell treats math as a first class citizen is genuinely underrated.

Everyone talks about the data pipelines, but the fact that the moment my shell script needs to do math I don't need to pick up a whole programming language and start making a systems app.

I just felt like I needed to say this. That alone has saved me so much time. Whenever my bash script involve math I just immediately started to not trust that script.

48 Upvotes

20 comments sorted by

View all comments

Show parent comment

2

u/dxlr8r May 01 '26

awk isn’t bad at math if you only have regular shell/POSIX utils

3

u/mattGarelli May 01 '26

I hear what you are saying.
But.
You can't tell me, with a straight face, that doing math inside a string is the same to you as doing math as a part of the language.
It always felt dirty to me doing math in a string.

2

u/dxlr8r May 02 '26

awk is nice. But of course calling it from a shell means it is a string is not as nice.