Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!adm!mrd@sun.mcs.clarkson.EDU From: mrd@sun.mcs.clarkson.EDU Newsgroups: comp.unix.wizards Subject: emacs or fg %emacs Message-ID: <10723@brl-adm.ARPA> Date: Mon, 7-Dec-87 18:55:33 EST Article-I.D.: brl-adm.10723 Posted: Mon Dec 7 18:55:33 1987 Date-Received: Sat, 12-Dec-87 18:44:17 EST Sender: news@brl-adm.ARPA Lines: 16 Someone asked for a little alias the would either fireup emacs or bring it to the foreground. Well I came up with this. I am sure there is a more elegant and shorter way to do it but it does do it, at least on Sun OS 3.4. alias gnu 'eval `ps | egrep "([ ][e]macs|[ ][C]OMMAND)" | sed "s/.*emacs.*/fg %emacs/" | sed "s/.*COMMAND.*/emacs/" | tail -1`' It does force you to use gnu instead of emacs the way I have it here but you can if necessary modify it so that you can call it emacs, it is just more complicated. Michael DeCorte mrd@clutx.clarkson.edu mrd@clutx.bitnet