0 like 0 dislike
1 view
in Linux by anonymous Bilge (165k points)
how to use case in bash script

1 Answer

0 like 0 dislike
by anonymous Bilge (165k points)
#!/usr/bin/env bash
if [[ "${1}" == "" ]]; then
  echo "Boş."

  elif [[ "${1}" == "square" ]]; then
  echo "Kare'."

  elif [[ "${1}" == "circle" ]]; then
  echo "Daire'."

  elif [[ "${1}" == "triangle" ]]; then
  "Üçgen"

else
  echo "Bilinmiyor"
  exit 1

  fi
...