lib/pvl/util.sh
author Tero Marttila <terom@paivola.fi>
Mon, 09 Mar 2015 21:17:06 +0200
changeset 736 75938aa0390b
parent 627 a81206440be2
permissions -rw-r--r--
pvl.hosts.interfaces: remove junos-specifics
## 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'
}