MIAOU-BASH is a collection of settings and helpers for leveraging BASH. Developer-friendly, it may be used as solo package with or without the miaou project.
 
 

8 lines
188 B

#!/bin/bash
START=$(date +%s.%N)
eval -- "$*"
END=$(date +%s.%N)
DIFF=$(echo "scale=6; (${END} - ${START}) / 1" | bc)
printf -- "-----------------\nelapsed seconds = %f\n" "${DIFF}" >&2