I need to create a script for school but it doesn't seem to work,
#!/bin/bash
echo "hoeveel vakken heb jij deze periode?"
read $AANTAL
if [ -d "/home/school/jaar_1/periode_4" ];
then
echo "directoy bestaat al."
else
mkdir -p /home/school/jaar_1/periode_4/vak{1..$AANTAL}
fi
Try this. When debugging remember you can type these commands individually and add echo commands to debug by outputting the values of the variables at each stage. Note that your read command was also incorrectly referring to $AANTAL instead of AANTAL.