linux-tutorial/codes/demos/bash/statement/caseDemo.sh

19 lines
271 B
Bash

#!/usr/bin/env bash
echo "input param: " $1
case $1 in
"jpg" | "jpeg")
echo "It's image with jpeg extension."
;;
"png")
echo "It's image with png extension."
;;
"gif")
echo "Oh, it's a giphy!"
;;
*)
echo "Woops! It's not image!"
;;
esac