lib/pvl/util.sh
author Tero Marttila <tero.marttila@aalto.fi>
Mon, 02 Mar 2015 19:58:35 +0200
changeset 700 88b0d3df1ad7
parent 627 a81206440be2
permissions -rw-r--r--
pvl.hosts.dhcp: subclass class name is a String
## 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'
}