Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!caen!ox.com!mudos!mju From: mju@mudos.ann-arbor.mi.us (Marc Unangst) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Program Usage Program needed Message-ID: <7B5RR2w163w@mudos.ann-arbor.mi.us> Date: 29 Oct 90 02:22:29 GMT References: <1990Oct28.191740.5447@ariel.unm.edu> Organization: The Programmers' Pit Stop, +1 313 665 2832 Lines: 26 ee5391aa@hydra.unm.edu (Duke McMullan n5gax) writes: > alias tc `timer >> logfile ^ tc++ ^ timer >> logfile` > > Assuming that Turbo C++ is invoked by the call "tc++", this would create > a logfile giving the time entered, time exited and elapsed time. You'd Why bother with all this? If you're going to muck around with aliases, you might as well do it right... alias tc `log /w c:\tc\tc.log "Turbo C++ started"^*tc^log /w c:\tc\tc.log "Turbo C++ stopped"` (all on one line, natch). If you didn't care about the special messages, you could just do "log /w c:\tc\tc.log on" and figure out when TC++ was started or stopped by grepping for "tc". I doubt TC++ is started with the command "tc++", since "+" is illegal in MS-DOS filenames. More likely than not, it's just "tc" (which raises incompatibility issues with regular Turbo C, but...). The "*" in front of the "tc" in the alias prevents 4DOS from expanding it further, creating an infinite alias loop. -- Marc Unangst | mju@mudos.ann-arbor.mi.us | "Bus error: passengers dumped" ...!umich!leebai!mudos!mju |