lib/pvl/util.sh
author Tero Marttila <terom@paivola.fi>
Mon, 09 Mar 2015 19:48:19 +0200
changeset 735 008cfe47b194
parent 627 a81206440be2
permissions -rw-r--r--
pvl.hosts.interface: sub-interfaces for a host, which are not associated with any separate domain/network
## 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'
}