|
From: | Chet Ramey |
Subject: | Re: Question about case statement in Bash docs |
Date: | Mon, 10 May 2021 10:10:02 -0400 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 5/10/21 7:12 AM, AlvinSeville7cf wrote:
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?
You're right; case patterns undergo quote removal. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |