Message-ID: <3CEE7DCE.BD8CACAE@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: GNU Pascal (gpc) 2.1 released References: <3CED528D DOT 7DCF9660 AT yahoo DOT com> <3CED6BA6 DOT 48D4D0FE AT phekda DOT freeserve DOT co DOT uk> <200205241404 DOT g4OE4Qt03777 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 39 Date: Fri, 24 May 2002 19:00:56 GMT NNTP-Posting-Host: 12.90.172.110 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1022266856 12.90.172.110 (Fri, 24 May 2002 19:00:56 GMT) NNTP-Posting-Date: Fri, 24 May 2002 19:00:56 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com DJ Delorie wrote: > > > : bash-2.04$ rm -fv @foo > > > > I have myself been bitten by this. > > > > Is there any good reason why a non-existent file shouldn't > > produce a warning? > > If you use the "-f" option of rm, it silences warnings. > > What djgpp does is look to see if @foo means a file foo. If > the file foo doesn't exist, the whole @foo is passed to the > program as-is (that allows you do to do things like "grep > @PATH@ Makefile.in"). If the program doesn't warn about > invalid parameters, it will go unnoticed. Which means that "rm @foo" cannot mean to remove the file "@foo", because if it exists it is an extended command line, and if it doesn't it becomes an argument. So, at least for rm, that usage makes no sense. For other programs it is another matter. As long as the usage is engrained in the DJGPP system, it should not be changed. However I suggest that the faq should be enhanced, because this looks like a pretty good gotcha. BTW a thought occurs to me - if the @ mechanism is to effectively extend command lines, what is the effect of multiple @ in a single command, e.g. "rm @foo @bar"? If I remember maybe I will try it later with "echo @foo @bar", after building some foo and bar files. First I will have to make a DJGPP echo command, with a different name. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!