author | Tero Marttila <terom@paivola.fi> |
Tue, 10 Mar 2015 00:26:31 +0200 | |
changeset 740 | 74352351d6f5 |
parent 627 | a81206440be2 |
permissions | -rw-r--r-- |
627 | 1 |
## Output calling function's name. |
2 |
function func_caller { |
|
3 |
caller 1 | cut -d ' ' -f 2 |
|
4 |
} |
|
5 |
||
6 |
## Test if given symbol is a function |
|
7 |
# XXX: tests if it is anything atm? |
|
8 |
function func_test { |
|
9 |
type -t "$1" > /dev/null |
|
10 |
} |
|
11 |
||
12 |
## Get current unix (utc) timestamp |
|
13 |
function unix_time { |
|
14 |
date +'%s' |
|
15 |
} |