Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!ut-sally!im4u!jai From: jai@im4u.UUCP (Jai Srinivasan) Newsgroups: comp.sys.ibm.pc Subject: Re: Improve response time with paths Message-ID: <2408@im4u.UUCP> Date: Wed, 11-Nov-87 09:40:55 EST Article-I.D.: im4u.2408 Posted: Wed Nov 11 09:40:55 1987 Date-Received: Fri, 13-Nov-87 22:30:41 EST References: <15000048@silver> Reply-To: jai@im4u.UUCP (Jai Srinivasan) Organization: U. Texas CS Dept., Austin, Texas Lines: 59 In article <15000048@silver> creps@silver.bacs.indiana.edu proposes the use of a ramdisk to store BAT files that start up programs and have the ramdisk as the first directory of the PATH variable. The advantage being that in most cases most directories of the PATH do not need to be searched as the BAT file will be found on the ramdisk and it will have the entire directory name of the program that needs to be run. Here is an alternative to using BAT files. Get CED and use its synonym feature. In addition to being an excellent command line editor, CED can store abbreviations for commonly used commands. It has the ability to re-order parameters from the command line (the %1 .. %9 of BAT files) and it can expand a command into more than 1 DOS command. Best of all, it is in public domain and virtually bug-free. (An updated commercial version called PCED is also available from its author.) Here is a sample of the power of CED. To those accustomed to aliases on a UNIX system, there is nothing novel in this. Others may find it useful though. SYN av c:\etc\archvrs\pkxarc /v SYN am c:\etc\archvrs\pkarc /Oc /m SYN ae c:\etc\archvrs\pkxarc SYN dcp for %i in (c:\bin\misc\list.com c:\bin\misc\ls.exe c:\bin\misc\cd.exe) do copy %i d: Now av is an abbreviation for "c:\etc\archvrs\pkxarc /v". The rest of the command line after av is plugged in after "c:\etc\archvrs\pkxarc /v". Similarly for the am and ae. The last command re-initializes my ramdisk by copying specific files into it. A more complicated example: SYN Starttimer C:\Etc\Norton\Timer /c%1 start /n /l Now typing "StartTimer 2" causes the command C:\Etc\Norton\Timer /c2 start /n /l to be executed. Other synonyms can juggle around parameters even more. Finally an example that causes one command to execute more than one DOS command: REM Replace the file (first argument) by the output of the command REM (arguments 2 thru the last argument) with input the file of REM the first argument. Useful for filters that do not accept files REM but require input from stdin. REM REM Eg: rplc thisfile sort OR rplc thisfile tr A-Z a-z SYN rplc c:\bin\misc\mv -i %1 !CED!_!-.tmp ;%2 %3 %4 %5 %6 %7 %8 %9 < !CED!_!-.tmp > %1 ;del !CED!_!-.tmp The ';' (the "chain character" of CED) separates 2 commands. So the file %1 is first renamed to !CED!_!-.tmp, then the filter is executed and its output sent to %1 and finally the temporary file !CED!_!-.tmp is deleted. -------- Jai Srinivasan, UUCP: {gatech,harvard,ihnp4,pyramid}!ut-sally!im4u!jai ARPA: jai@im4u.UTEXAS.EDU, jai@sally.UTEXAS.EDU -----------------------------