I wrote a simple bash script to create some directories, like so:
#!/bin/sh
PROJECT_DIR=$(cd "$(dirname "$0")" && pwd)
cd ${PROJECT_DIR} || exit 1
mkdir -p Website/{static/{cs,js},templates/{html,xhtml}}
However, after I run the script (./script.sh
), the directory structure looks like this:
There is no syntax error in my script. When I try the mkdir
command directly on the terminal, the directories are created correctly.
Why is the bash script run behaving this way?