Let me define a function as follows
Code:
time-stamp ()
{
if (( $# == 0)); then
tmstamp="$(date +T%T.%N)"
else
tmstamp="$(date $1)"
fi
echo "$tmstamp"
}
What would be the optimal way to call the function with a format?
Code:
stamp="$( time-stamp +T%T.%N )"
Should one quote (double or single) the format with
"+T%T.%N" or
'+T%T.%N'?