lib/pvl/util.sh
author Tero Marttila <tero.marttila@aalto.fi>
Mon, 02 Mar 2015 20:35:29 +0200
changeset 703 6fb97fcf0999
parent 627 a81206440be2
permissions -rw-r--r--
update: pvl/log: fix no-tty execution
## 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'
}