From: "Arthur J. O'Dwyer" Newsgroups: comp.os.msdos.djgpp Subject: Bug in command-line globbing Date: Thu, 12 Dec 2002 20:49:46 -0500 (EST) Organization: Carnegie Mellon, Pittsburgh, PA Lines: 50 Message-ID: NNTP-Posting-Host: smtp7.andrew.cmu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: bb3.andrew.cmu.edu 1039744186 26786 128.2.10.87 (13 Dec 2002 01:49:46 GMT) X-Complaints-To: advisor AT andrew DOT cmu DOT edu NNTP-Posting-Date: 13 Dec 2002 01:49:46 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com % cat test.c #include int main(int argc, char **argv) { int i; for (i=0; i < argc; i++) { printf(":%s:\n", argv[i]); } return 0; } % gcc -o test.exe test.c % test \ :\: % test '\' :': % test '\\' :\': % test "\\" :\": % So my question is: is this the correct behavior for the default "filename globbing" performed by DJGPP-compiled programs? If not, has it been reported before? If so, why? It looks like the '\' character escapes certain characters - quotes and double quotes, in particular - but does not escape itself. This is probably a bug, and almost certainly a design flaw. If someone believes this is correct behavior, please tell me how to produce the output % test (something goes here) :*/: :hello: from the above program (assuming the program is called from a directory containing one or more subdirectories, of course). -Arthur, who wants to write a tr