home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.programmer:5703 comp.sources.wanted:5386
- Newsgroups: comp.unix.programmer,comp.sources.wanted
- Path: sparky!uunet!newsflash.concordia.ca!nstn.ns.ca!cs.dal.ca!ug.cs.dal.ca!franklin
- From: franklin@ug.cs.dal.ca (Steve Franklin)
- Subject: Re: Get hostname from IP address
- Message-ID: <BzBAIH.JAv@cs.dal.ca>
- Sender: usenet@cs.dal.ca (USENET News)
- Nntp-Posting-Host: ug2.cs.dal.ca
- Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada
- References: <1992Dec11.152438.18365@fwi.uva.nl> <1992Dec15.155506.418@ccnews.nctu.edu.tw>
- Date: Tue, 15 Dec 1992 17:42:17 GMT
- Lines: 31
-
- In article <1992Dec15.155506.418@ccnews.nctu.edu.tw> hch@CCCA.NCTU.edu.tw (Huang Chih-Hsien) writes:
- >dejesus@archimedes.nwc.navy.mil (Francisco X DeJesus) writes:
- >>I'd like to find a utility I can call from the command-line with an
- >>internet IP address as an argument, and have it return to me the full
-
- >(EXAMPLE: lookup 140.111.3.21 for NCTUCCCA.edu.tw)
- >% nslookup
- >> set type=ptr
- >> 21.3.111.140.in-addr.arpa.
- >
-
- or of course, you can try this:
-
- 13:38(1)/bin% host 129.173.4.4
- (rad prompt eh? time, shell-level, and base directory)
- Name: ug.cs.dal.ca
- Address: 129.173.4.4
- Aliases:
-
- if you just want the host name?
-
- 13:40(1)/bin% host 129.173.4.4 | grep "Name" | awk '{printf"%s\n",$2}'
-
- ug.cs.dal.ca
-
- steve
- --
- aasdSteveFranklin-Subliminal Psychology Major.ks;dlasBlueJaysRULEkasdfeahsdbfl
- sd;lfaswoq[eBuyMeAQuadra!!!mbnZMXCNdfsba;KdSPAMiuroqiyetIBMSuxiweuryth'ewr;mxn
- qpuepriuPartyOneqtuj;,n.,xnc,kjasFlameMeNot!;lkj;lkgkjd;askElvisLivesjhfquweru
- zx.cfranklin@ug.cs.dal.ca,sk;t;lrut[Superboy@ac.dal.cav.zx,Physics!eq3rwkh;oHA
-