lib/pvl/util.sh
author Tero Marttila <terom@paivola.fi>
Sat, 07 Mar 2015 16:31:11 +0200
changeset 732 ddb77f32b35a
parent 627 a81206440be2
permissions -rw-r--r--
version: 0.8.0b2
## Output calling function's name.
function func_caller {
    caller 1 | cut -d ' ' -f 2
}

## Test if given symbol is a function
# XXX: tests if it is anything atm?
function func_test {
    type -t "$1" > /dev/null
}

## Get current unix (utc) timestamp
function unix_time {
    date +'%s'
}