Message-ID: <3D151A90.4050807@attbi.com> From: oldCoder Organization: Programming and Network Administration User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Environment variables, and command line option's. References: <3D0E8426 DOT F2AD852A AT yahoo DOT com DOT au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 51 NNTP-Posting-Host: 24.128.41.67 X-Complaints-To: abuse AT attbi DOT com X-Trace: sccrnsc03 1024793224 24.128.41.67 (Sun, 23 Jun 2002 00:47:04 GMT) NNTP-Posting-Date: Sun, 23 Jun 2002 00:47:04 GMT Date: Sun, 23 Jun 2002 00:47:04 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Jason Hood wrote: > > Hans-Bernhard Broeker wrote: > >>Stratis Aftousmis wrote: >> >>>Hello all, first question i have i think alot of people have asked before >>>but i have yet to find an answer. Can i set up environment variable's for my >>>input and output directories? Yes i did RTFM on enviorment variable's but i >>>saw nothing on what i want to do. Below is an example, everything between % >>>and % is an environment variable: >>> >>>c:\djgpp\bin>gcc %input% -o %output% >>> >>You can set up environment variables to you heart's content. But that's >>not the real issue. That would be how you can make the tools *use* the >>values of those variables. >> >>At this point, one rather stupid limitation of raw DOS would bite you: >>it doesn't expand environment variables at all in interactive use. I.e. >>if you typed these commands at the command.com prompt >> >> set INPUT=d:\some\strange\place >> set OUTPUT=E:\an\even\stranger\location >> gcc %INPUT%/foo.c -o %OUTPUT%/foo.o >> >>gcc would _not_ refer to file d:\some\strange\place\foo.c, because >>%INPUT% didn't get replaced by the value of that variable. >>COMMAND.COM in raw DOS only does that while running .bat files. >> > > If you're willing to try another command line editor, CmdEdit can do > this, as well as filename completion, brace expansion and associations: > > http://cmdedit.adoxa.cjb.net/ > > Jason. > There's an even better 'command line editor,' and it comes with DJGPP: BASH (Bourne Again SHell). It's _far_ more powerful than any flavor of DOS box, especially when it comes to writing scripts (but I leave the building of executables, etc., to MAKE), and the only reason I can think of _not_ to use it would be the problems with Win2K/XP (which 2.0.4 seemed to mostly clear up). Thx, Phil