I wrote a program that creates a bunch of directories based on the depth and breadth. There is 1 parameter which is the directory i want to make all the directories in. The problem is that it only makes the directories in the directory where this script exists. Is there anyway I can choose where the script creates the directories?
#!/bin/sh
depth=2
breadth=5
open=($1)
for((i=0; i<depth; i++)); do
temp_open=()
for x in "${open[@]}"; do
temp=()
for((j=0; j<breadth; j++)); do
mkdir -p $i/$j
temp=(${temp[@]} "$i/$j")
done
temp_open=(${temp[@]})
done
open=(${temp_open[@]})
done