dave@andromeda.UUCP (03/26/87)
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. If you have a solution PLEASE reply by e-mail. I will summarize for those interested. Thanx. -- seismo \ pyramid \ Dave Bloom ihnp4!packard >!rutgers >!andromeda!dave Office: (201) 648-5083 allegra / hoxna / "You're never alone with a schizophrenic...."
grs@houxa.UUCP (03/27/87)
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
jgy@hropus.UUCP (03/27/87)
> 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. > > If you have a solution PLEASE reply by e-mail. I will summarize for those > interested. > > Thanx. The latest release of ksh has echo as a builtin (rather than print). Or just alias print=/usr/lbin/print or whatever, the echo alias will keep going to the old print.