bin bash bad interpreter bin bash bad interpreter unix unix

bin bash bad interpreter


It should be

#!/bin/bash

(first slash)


#!/bin/bashmkdir ~/folderbrojac=0while [ "$brojac" -le 5 ]    # with [...], need to quote vars and spaces around [ and ]do  mkdir ~/folder/zad"$brojac"  brojac=$(( brojac+1 ))     # cannot have spaces around =done

I would write:

for ((i=0; i<=5, i++)); do    mkdir -p ~/folder/zad$idone


Or with an simple

mkdir -p ~/folder/zad{1..5}

if you want zad1, zad2 .. zad5

or

mkdir -p ~/folder/zad{,1..5}

if you want zad, zad1, zad2 .. zad5