Assuming set +f in effect, the first 2 should expand identically, how I read 
XCU 2.6.5 and 2.6.6; treating the * as a glob special character and the ? as a 
literal. For the 3rd case the standard is silent on whether the closing " is 
assumed on reaching the end of the field established during token recognition, 
by the <NL> after the 'r' in '$var', or is a syntax error when the glob is 
evaluated. The text assumes, in XCU 2.13 by use of 'quoting' generically, if 
single quotes or double quotes are used to begin a literal pattern sequence the 
application will ensure the closing quote is always present. I agree a 
statement should be added to XCU 2.13.1, Line 76221, about what is the required 
interpretation. It only has now a trailing '\' is undefined behavior.


In a message dated 4/26/2018 8:24:33 PM Eastern Standard Time, 
k...@munnari.oz.au writes:

 
Oh, one more thing about patterns - a question this time, though the

answer might end up suggesting more text that needs to be in
the standard.

If I have

 var='a*"?"'

and then I do

 echo $var

what should the result be? Is this absolutely the same as

 echo a*"?"

?

And if so, whay would happen if instead I had

 var='a*"?'

(and used it the same way?)

kre

Reply via email to