Here is my shell script and the error I get when running it:
#!/bin/bash
path=$1
execute=$2
a=$3
operation=$4
name=$5
if [ "$operation" == "run" ]; then
cd $path
./$execute $a
fi
elif [ "$operation" == "copy" ]; then
mkdir -p $path
cp $execute $path/$name
fi
elif [ "$operation" == "delete" ]; then
rm $path
cd copy
rm $name
cd ..
rmdir copy
fi
./commandsScript.sh: line 14: syntax error near unexpected token `elif' ./commandsScript.sh: line 14: `elif [ "$operation" == "copy" ]; then'
I've spent a long time trying all sort if-else statements variances but have not found the error solution. May someone help?