Hei everyone and happy new year,
I am trying to input the output of the stat commad to a value like so:
If stat -c %y mail.log.0.gz gives me an output '2012-01-03 04:50:57.000000000 +0200', I am trying to find a way to input the "2012-01-03 04:50:57" part, to a value to use later in a Subject with mutt.
Which would be something like this (i imagine):
This is not code it's logic:
LOGDATE = stat -c %y mail.log.0.gz (without the .000000000 +0200)
mutt -s "BLA BLA $LOGDATE" -a attachment.txt firstname.lastname@example.org
But I can't get it to work.