Answer the question
In order to leave comments, you need to log in
Why doesn't mkdir work?
I execute the command
mkdir -p /home/user/radio/audio/$(date -d"tomorrow" +%e%B)
/home/user/radio/audio/12мая
and along the way, a non-existent audio directory is created. mkdir -p /home/user/radio/audio/$(date -d"4 days ago" +%e%B)
/home/user/7мая
moreover, the audio directory appeared where it should be and it is empty. Answer the question
In order to leave comments, you need to log in
date -d"4 days ago" +%e%B
The first thing to do in this case is to add "echo" to the beginning of the command:
echo mkdir -p /home/user/radio/audio/$(date -d"4 days ago" +%e%B)
mkdir -p "/home/user/radio/audio/$(date -d"4 days ago" +%e%B)"
$(...)
(as well as an option for environment variables) are resolved; but spaces obtained in this way are not treated as argument separators. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question