*BSD News Article 86061


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!portc01.blue.aol.com!news-peer.gsl.net!news.gsl.net!howland.erols.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: more/page and rsh/hostname symbolic links
Date: 2 Jan 1997 14:42:25 GMT
Organization: Private BSD site, Dresden
Lines: 44
Message-ID: <5aghgh$6fa@uriah.heep.sax.de>
References: <5aa0qr$iik@newshost.lanl.gov>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:33492

crs@lanl.gov (Charlie Sorsby) wrote:

> "more -c").  If anyone else is interested:
> 
> # ln -s /usr/bin/more /usr/bin/page
> 
> So the "more" code apparently does check to see if it was called as
> "more" or as "page" and behaves accordingly.  When I'd seen nothing
> about page in the man pages, etc. I was a little worried until I
> tried this.

I have looked into the source code for "more", and there's not a
single occurance of the word "page" there.  So you must be telling
about a different version of "more" here.  "more -c" sets an internal
variable called `top_scroll', and i can't see any other occurance
where this variable gets set except of the option -c.

Anyway, why don't you simply use a shell alias:

alias page "more -c"		# csh

alias page="more -c"		# sh

?

> So, today, I got to thinking.  The Suns that I've worked with had
> a way to set things up so that one could rlogin to a machine or run
> rsh on it by simply entering the name of the machine.  This, too,
> is an example of controlling the behavior of a program (in this case
> rsh) by the name it is called and, again, uses symbolic links.

This behaviour is documented.  Whether you find this convenient or not
is certainly a matter of personal preference.  If your network has
hosts named "ls" or "vi", i doubt you will appreciate it. :)

And, many people seem to avoid the r commands these days, and prefer
ssh & Co.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)