Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!asuvax!hrc!gtephx!reesd From: reesd@gtephx.UUCP (David Rees) Newsgroups: comp.sys.apollo Subject: Re: Aliases For Aegis Commands Summary: Be carefull with aliases on Apollo Keywords: aliases aegis Message-ID: <44c14aa1.f9df@gtephx.UUCP> Date: 31 Jul 89 20:40:21 GMT References: <1632@dover.sps.mot.com> Organization: AG Communication Systems, Phoenix, Arizona Lines: 64 In article <1632@dover.sps.mot.com>, turner@dover.sps.mot.com (Robert Turner) writes: > First I know this is a wimpy question, but what the heck. I'm > an old Aegis kind of guy slowing migrating to BSD on SR10+. > What I'm looking for is a set of aliases for some of the more > common Aegis commands, e.g. cpf, dlf, dlt, crd, crl, wd, etc. > My fingers keep typing Aegis commands while my brain is saying > BSD, BSD, BSD! First of all you must be carefull when making aliases for aegis to unix or the other way around. For instance I tried to make an alias for cpf: %alias cp cpf This is WRONG! First of all cpf does all its copying in pairs while cp copies all the items to the last item. $cpf F1 F2 F3 F4 F1 -> F2 (F1 is copied to F2) F3 -> F4 (F3 is copied to F4) %cp F1 F2 F3 F4/ F1 F2 F3 -> F4 (They are copied into F4) And second of all with the Unix shells (Bourne and C) the regular expressions are expanded by the shell, while in Aegis it seems like the expressions are expanded by the command. For instance I typed the following: %cpf ?*.c ./backup -r <--- DON'T DO THIS! While this is right out of the manual I missed a critical detail. The '%' instead of the '$'. Since the C shell expanded the wildcard first, it sent cpf a list of the files and then cpf proceeded to replace every other file (about three weeks worth of work, thank god for backups). A rule I follow is, NEVER alias an AEGIS command as a Unix command (or the reverse). The two systems are just not that much alike. I would suggest getting used to cp, rm -r (dlt) etc. In addition to the wild carding ect., the options go after instead of before. It would be much easier for you to learn the Unix commands. Here is a list of similar commands (I wouldn't alias them.....) cpf cp (Not very similar) dlf rm dlt rm -r (Recursive remove) crd mkdir crl ln -s (Symbolic link, I think the target and source are switched in these) wd pwd Perhaps you could make an alias that instead of performing the command, echos to you the correct command to use. i.e. %alias dlt 'echo Use rm' -David BTW, I used the standard that a '$' prompt is an AEGIS shell and that a '%' is an C (Unix) shell. BTW2, are you no longer able to access AEGIS commands by giving the path (/com/cpf) after SR10? I am still on SR9.7.