mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-30 05:02:54 +08:00
12 lines
296 B
Plaintext
12 lines
296 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# REF: https://unix.stackexchange.com/questions/113795/add-thousands-separator-in-a-number
|
||
|
|
||
|
function commanum () {
|
||
|
LC_NUMERIC=en_US printf "%'.f" $1
|
||
|
}
|
||
|
|
||
|
# test for interactive shell / OK to echo text
|
||
|
#[ $(echo $- |grep i |wc -l) -gt 0 ] &&
|
||
|
[ ! "$1" = "" ] && commanum $1
|
||
|
#echo $1
|