Hello! Let’s consider the following snippet from [1]Bash docs:
case word in
    [ [(] pattern [| pattern]…) command-list ;;]…
esac


   It is written that: Each pattern undergoes tilde expansion, parameter
   expansion, command substitution, and arithmetic expansion. But if it’s
   true why the following code outputs Y?


   x=test


   case $x in

       "test") echo Y

   esac


   Pattern is quoted but no quote removal is performed according to docs.


   alvinseville7cf@Alvins-MacBook-Pro ~ $ echo -e "Best regards,
   \e[33m$(whoami)\e[0m." && exit $SUCCESS_EC

References

   1. https://www.gnu.org/software/bash/manual/bash.html#Conditional-Constructs

Reply via email to