Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to do thousands grouping in zsh?



On Thu, 04 Sep 2014 16:52:23 +0800
Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> wrote:
> Is there any other method?

From 5.0.6, just released.

print $(( [#_3] 299792458 ))

299_792_458

It's always "_" because it's in the same format that's understood on
input.  You could postprocess it

print ${$(( [#_3] 299792458 ))//_/,}

pws



Messages sorted by: Reverse Date, Date, Thread, Author