I am inside a bash script located at /home/[username]/Documents/work/script.sh
. I want to create two folders, potato/tomato
at /home/[username]/
. To do so, here's my script:
mkdir -p "~/potato/tomato"
However, this creates the two folders like this: /home/[username]/Documents/work/potato/tomato
.
I don't want to create these folders in my current working directory, I want them in my current user's home directory. What am I doing wrong and what should I change?