Add files via upload

This commit is contained in:
kneutron 2021-04-09 15:25:51 -05:00 committed by GitHub
parent 5c7040e99f
commit 30e739b08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

12
commasep-num.mrg Normal file
View File

@ -0,0 +1,12 @@
#!/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

6
failexit.mrg Normal file
View File

@ -0,0 +1,6 @@
# failexit.mrg
function failexit () {
echo '! Something failed! Code: '"$1 $2" # code # (and optional description)
exit $1
}