Xref: utzoo comp.unix.i386:6308 comp.unix.xenix:12242 Path: utzoo!attcan!uunet!sci34hub!cdthq!gary From: gary@cdthq (gary) Newsgroups: comp.unix.i386,comp.unix.xenix Subject: Re: Xenix vs. UNIX Message-ID: <5P7HL3w161w@cdthq> Date: 29 Jun 90 01:16:27 GMT References: <4716@thebes.Thalatta.COM> Organization: Garys' Home for Obselete Computers Lines: 35 campbell@Thalatta.COM (Bill Campbell) writes: > > Every time I get on a ``pure'' UNIX box I miss Xenix commands > like ``copy -romv'' and 'l'. If you're on a SysV.[23] system, write yourself a bunch of shell macros to emulate the commands you miss. I use a bunch, since I do admin work, that save me from typing. I also create them on the fly while doing debugging work. For example: ll () { ls -al $* ; } is a shell macro in my /etc/profile. It executes the ls -al with parameter substitution, and stays within the current environment. pe () { ps -ef | sort ; } is another I use on my mail hub (at work). On the other systems, I have a grep -v in there to get rid of anything with "root" in it, so I see only users' processes. Shell macros can be multi-line, have multiple commands per line separated with semicolons, and are memory resident so they don't have to be searched for along a path (cuts down on system load, too, especially if you use explicit paths to the commands). Macros can be passed positional parameters just like a shell, can include loops, and basically do about anything a short script will do, faster. The only disadvantage is that I haven't found a way to edit them in the environment. They can be redefined, though, so you can maintain them in a small file and use . to reload them after editing. Short ones (two or three commands) I'll usually retype, longer ones I'll debug as scripts and then change to a macro. I think more recent versions of Xenix support this, too.... Gary Heston, at home...