Let's say I have the following variable set:
directoryTrash="~/trash"
How can I use this variable to create the directory it describes? I've tried using it with mkdir
in the following way:
mkdir -p "${directoryTrash}"
When I do this, the directory "~" is created in the working directory and the subdirectory "trash" is created within it. How can I use tilde expansion to get the full path so that mkdir
can do what I want it to do?