WG15 Defect Report Ref: 9945-2-106
Topic: mailx and quoting ambiguity

This is an approved interpretation of 9945-2:1993.


Last update: 1997-05-20



	Topic:                  mailx and quoting ambiguity
	Relevant Sections:

Defect Report:

	Date: Tue, 4 Apr 1995 14:37:40
	From:  Andrew Josey

Dear Standards Board,
	I would like to request a formal interpretation on the following
issue concerning the mailx utility in POSIX.2.

POSIX.2 says in

  " - An argument can be enclosed between paired double-quotes (" ") 
or single-quotes (' '); any white space, shell word expansion or backslash
characters within the quotes will be treated literally as part of the 
argument.  A double- quote will be treated literally within single-
quotes and vice versa.  "

It then says that

File names, where expected, shall be subjected to the process of shell word
expansions ....

My reading of this (and confirmed by historical implementations) is that the 
arguments are parsed, and mailx does not interpret the contents of an 
argument quoted by "" or ''.  

Then, iff the argument to the command specifies a filename; the argument is
subjected to the process of shell word expansion.

This allows the use of commands such as

? write "$((1 + 3))"		# uses filename "4"
? save "$(date +%A)"		# used filename e.g. "Tuesday"

Is this interpretation correct?

Interpretation response

        The standard is unclear on this issue, and no conformance
        distinction can be made between alternative implementations
        based on this.  This is being referred to the sponsor.


Forwarded to Interpretations group: Apr 5 1995
Proposed resolution circulated: May 16th
Comments due: June 15th
Date Finalised: June 16th