[net.unix-wizards] Bourne shell and FILEMATCH

mleech (11/24/82)

I was browsing through the source for the Bourne shell the other day,
 and I ran across an internal shell variable called "FILEMATCH".
 Does anyone, offhand, know what it's used for, or am I going to
 have to WADE through Bourne's ALGOLesque code to find out what it's
 used for?
Send any responses to me via mail.

				Marcus Leech,
				decvax!utzoo!mleech.

gwyn@Brl@sri-unix (11/27/82)

From:     Doug Gwyn <gwyn@Brl>
Date:     25 Nov 82 23:57:56-EST (Thu)
FILEMATCH is never assigned to; the code that would do this is commented out.
What this variable WOULD contain were it assigned is the last filename-pattern
that did NOT expand into a list of files.  In the case of
	$ command foo*
for instance, where there are no files matching foo*, I believe FILEMATCH
would contain "foo*".  This is apparently a debugging aid.

P.S.  It only took 3 greps and a quick peek at service.c to arrive
at this conclusion, and I'm not very familiar with the Bourne shell.
(I hope I'm right; I didn't want to spend any more time on the matter.)