Great Circle Associates Majordomo-Workers
(February 1994)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Using `get' on filenames with spaces
From: "John P. Rouillard" <rouilj @ cs . umb . edu>
Date: Mon, 07 Feb 1994 13:56:22 -0500
To: Brent Chapman <brent @ greatcircle . com>
Cc: Alan Millar <AMillar @ bolis . sf-bay . org>, patrick @ casbs . stanford . edu (Patrick Goebel), majordomo-workers @ greatcircle . com
In-reply-to: Your message of "Sun, 06 Feb 1994 22:39:52 PST." <9402070639.AA19354@mycroft.GreatCircle.COM>


In message <9402070639.AA19354@mycroft.GreatCircle.COM>, Brent Chapman writes:
> "John P. Rouillard" <rouilj@cs.umb.edu> writes:
> 
> # Call the following items a-d.
> # 
> # > > get ww Mailing List Info
> # > > get ww "Mailing List Info"
> # > > get ww 'Mailing List Info'
> # > > get ww Mailing\ List\ Info
> #
> # 	1) set up the parser to replace the string "\ " with
> # 		\001 before splitting the line. Then replace
> # 		\001 with a space before passing the arguments
> # 		to the actual routines. (handles case d)
> # 
> # 	2) Spiff up the parser to recognize quotation marks, and pars
> e
> # 	   the items inside the quotes into a single item. We would
> # 	   have to be careful about embedded quotes however. (could
> # 	   handle b or c)
> # 
> # 	3) Punt the entire issue and have a pre_get routine paste the
> # 	   arguments back together with spaces if needed. (could
> # 	   handle a, or b and c if smart enough, or d if we are sure
> # 	   that no word can end with a '\'
> # 
> # I would lean to #1 and #3 myself. #2 I think could be implemented
> # using #3 is anybody feels ambitions, but I think some mechanism for
> # embedding spaces into a command is necessary.
> # 
> # I have implemented continuation lines by having a \ as the last non
> # whitespace character on the line, so adding another process loop to
> # replace "\ " with a sentinal after collecting the entire line wouldn't
> # be a problem.
> 
> Whatever is done, I'd rather see that section of code done once and
> done "right", rather than hacked on this month for quotes, and 3
> months from now for something different, and 6 months after that for
> something new yet again.  That kind of approach is what led me to the
> proliferation of .<flag> files, and I'd like to avoid making the same
> mistake again.

Ok folks lets hear it. What is the "right" way. I think the easiest is
a character based "\ " solution rather than quote based and I am
inclined to believe that the easiest is also the best, but I am open
to persuasion. Unless I see otherwise, I will implemenet the "\ "
escapes I guess.

				-- John
John Rouillard

Special Projects Volunteer	University of Massachusetts at Boston
rouilj@cs.umb.edu (preferred)	Boston, MA, (617) 287-6480
===============================================================================
My employers don't acknowledge my existence much less my opinions.


References:
Indexed By Date Previous: Re: Using `get' on filenames with spaces
From: Brent Chapman <brent@mycroft.GreatCircle.COM>
Next: Re: Using `get' on filenames with spaces
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Indexed By Thread Previous: Re: Using `get' on filenames with spaces
From: Brent Chapman <brent@mycroft.GreatCircle.COM>
Next: Re: Using `get' on filenames with spaces
From: "John P. Rouillard" <rouilj@cs.umb.edu>

Google
 
Search Internet Search www.greatcircle.com