I know this line works but i want to use it in a if statement if posible [[ "$filetype" = *.odt ]] && echo works if [[ "$filetype" = *.odt ]] then cecho "blue" "extract *.odt file" $user unzip "$I" completed=1 fi