I found this helpful post on how to export command output to a file, e.g.
command > myfile.txt
But is there a way I can export to myfileXXX.txt
, where XXX
is the day of the week, e.g. Mon
, Tue
, Wed
, etc., or even 1
, 2
, 3
, etc., or is there something similar like calendar date of month.
command > myfile$(date +%a).txt
is sufficient. – PerlDuck Sep 06 '18 at 12:20