I'm doing a script where I want to capture a path to the name of a user's file and then use it, plus the extension, to redirect the output of a command.
example:
Insert path: ~/Videos/file
I do this using " read -e path ", and then redirecting the output like this:
foo > ${path}.abc
But if this path has spaces, for example, ~/Área\ de\ Trabalho
, it goes wrong.
How to capture the path so that it works even for those with blanks?
Thank you in advance.