If I execute touch $(date '+%F %T')
, I expect one file whose filename comprises the date and time to be created; but instead two files are created: one whose name is the date, and the other whose name is the time:
$ touch $(date '+%F %T')
$ ls -1
12:39:26
2019-03-05
Why is this, and how can I create a file named 2019-03-05 12:39:26
instead, without using an underscore instead of a space?
date '+%F %T'
you will see you have two strings. This is like callingtouch 12:39:26 2019-03-05
. – Freddy Mar 05 '19 at 12:52