Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ptsfa!ihnp4!homxb!houxm!houxa!grs From: grs@houxa.UUCP Newsgroups: comp.unix.wizards Subject: Re: KSH alias question Message-ID: <358@houxa.UUCP> Date: Fri, 27-Mar-87 08:56:32 EST Article-I.D.: houxa.358 Posted: Fri Mar 27 08:56:32 1987 Date-Received: Sat, 28-Mar-87 13:54:05 EST References: <302@andromeda.RUTGERS.EDU> Distribution: na Organization: AT&T Bell Laboratories, Holmdel Lines: 27 Summary: Why not just alias print to the print cmd? In article <302@andromeda.RUTGERS.EDU>, dave@andromeda.RUTGERS.EDU (Dave Bloom) writes: > Here's a question for all you ksh wizards out there: (Are you listening > Mr. Korn???) > > Unfortunately, ksh uses the word 'print' for the ksh builtin equivalent > of echo(1). My problem: we have a utility called print on the system > whose name can't be changed for political reasons. What I'd like to do > is somehow change the name of the builtin WITHOUT recompiling the code > so that 'print' will refer to the utility, and so that 'echo' can still > be aliased to use the ksh print builtin. > I tried a little experiment here. I created a shell script called print. cat >print >>! echo "Hello world" ! Then I aliased print to the new command: alias print=$HOME/print Everything worked as expected. Although its clumsy, you could simple have ksh users alias print to your print command, and use the echo command (aliased as print -) instead of print. On the other hand, this may be a dumb idea. Glenn Sills