author | Tero Marttila <terom@paivola.fi> |
Mon, 09 Mar 2015 21:17:06 +0200 | |
changeset 736 | 75938aa0390b |
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 |
} |