I got this simple bash script:
#! /bin/bash
DATE=$(date +"%d%m%Y%H%M")
DATETIME=$DATE | awk '{print substr($1,1,2)"."substr($1,3,2)"."substr($1,5,4)", "substr($1,9,2)":"substr($1,11,2)}'
echo $DATETIME
The output of variable DATE is e.g.
250520141600
and the output of variable DATETIME should be:
25.05.2014, 16:00
but I got nothing.
What's wrong?