[H-GEN] This may be old hat to some, but...

Jason Henry Parker jasonp at uq.net.au
Thu Aug 26 09:25:45 EDT 1999


[ Humbug *General* list - semi-serious discussions about Humbug and
Unix-related topics. ]


I found this in the Linux manpages (man 7 environ, iirc), and have
tested it on digital unix hosts running tcsh too, so I'm curious to
know just how widespread it is.

If you set the `HOSTALIASES' environment variable to point to a file
formatted like /etc/hosts, it acts as a per-*user* alias file.  Handy
for those inconvenient shells where you don't have root access.  :)

To wit:

Script started on Fri Aug 20 17:52:05 1999
student% echo $SHELL
/bin/tcsh
student% setenv HOSTALIASES ~/.hosts
student% cat ~/.hosts
sharky		sharky.scu.edu.au
freezer		freezer.humbug.org.au
student% finger @sharky
[sharky.scu.edu.au]
Login       Name              TTY Idle    When            Office
jgormley John Peter Gormley    p0      Fri 15:20  ITD         6620 3365
wfry10   Warwick Kenneth Fry   p1   16 Fri 17:03 
[...]
student% telnet freezer
Trying 203.101.252.16...
Connected to freezer.humbug.org.au.
Escape character is '^]'.
Debian GNU/Linux potato freezer.asstd.net.au

freezer login: Connection closed by foreign host.
student% exit

script done on Fri Aug 20 17:52:43 1999

I've been looking for exactly this feature for some time and found it
by accident while looking for the format of the TZ environment
variable (which I didn't find, but that's okay...  :).

jason

-- 
____                                        /"\ ASCII ribbon
\ _/__ ``You're right.  Who needs dinner?'' \ /   campaign 
 \X  /      -- Kira Nerys, ``His Way''       X  against HTML
   \/                                       / \    email

--
This is list (humbug) general handled by majordomo at lists.humbug.org.au .
Postings only from subscribed addresses of lists general or general-post.



More information about the General mailing list