mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
Add files via upload
This commit is contained in:
parent
5c7040e99f
commit
30e739b08c
12
commasep-num.mrg
Normal file
12
commasep-num.mrg
Normal 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
6
failexit.mrg
Normal file
@ -0,0 +1,6 @@
|
||||
# failexit.mrg
|
||||
function failexit () {
|
||||
echo '! Something failed! Code: '"$1 $2" # code # (and optional description)
|
||||
exit $1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user