i'm new here, and i wanted to understand why my programm doesn't work. Can you help me ? thank you
Error
./mytry.sh: line 28: syntax error near unexpected token `fi' ./mytry.sh: line 28: `fi'
!/bin/sh echo "find?" read find if [ -z find ]; then echo "Ok" fi if [ ! -z $find ]; then echo " You are in $(pwd)" echo " I'm searching " for element in $(ls) do echo $element if [ -d $ element ]; then echo $element "exist and is not empty" fi fi done
if [ -d $ element ];=>if [ -d $element ];use www.shellcheck.net to validate it