Escape a mm/dd/YY backup date in a file name
6
votes
1
answer
659
views
I have been trying to:
cp file.csv file.$(date +%D).csv
But it fails because the filenames is:
file.03/27/19.csv
with the slash of separate directories.
And I have been trying again to:
cp file.csv file.$(printf "%q" $(date +%D)).csv
But it still fails.
Asked by tres.14159
(249 rep)
Mar 27, 2019, 05:27 PM
Last activity: Mar 28, 2019, 04:52 PM
Last activity: Mar 28, 2019, 04:52 PM