I'm trying to make tmp dir with bash script using that command:
mktemp -d /tmp/foo.XXXXXXXXX\r
So, as an result a have, for example (with common in the end):
/tmp/foo.wGBkCRpYt.
But I can't change dir after that from this bash script:
cd /tmp/foo.wGBkCRpYt
Answer: No such file or directory
cd /tmp/foo.wGBkCRpYt.
Answer: No such file or directory
What's wrong I do?
The first line of your example ends with
r
, while the rest of your examples end with.
(dot, period, full stop). Perhaps if they all matched, it would work.Tested on Debian 11:
This works for me:
This works for me: