From owner-freebsd-questions@FreeBSD.ORG Sun Feb 8 03:27:14 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3983816A4CE for ; Sun, 8 Feb 2004 03:27:14 -0800 (PST) Received: from imf20aec.mail.bellsouth.net (imf20aec.mail.bellsouth.net [205.152.59.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4F5243D1D for ; Sun, 8 Feb 2004 03:27:13 -0800 (PST) (envelope-from nickpub@imap.cc) Received: from imap.cc ([68.19.94.239]) by imf20aec.mail.bellsouth.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040208112713.WHLU5621.imf20aec.mail.bellsouth.net@imap.cc> for ; Sun, 8 Feb 2004 06:27:13 -0500 Message-ID: <40261D14.6070700@imap.cc> Date: Sun, 08 Feb 2004 06:27:16 -0500 From: Nicholas Holley User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <40261B2B.70603@users.sourceforge.net> In-Reply-To: <40261B2B.70603@users.sourceforge.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: How to query the computer's ip address? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2004 11:27:14 -0000 Rob wrote: > > Hi, > > Silly question, maybe, but is there a simple command to query the > computer's > ip address? Something similar to 'hostname' for finding the computer's > hostname. > I need the four dot-separated ip numbers. > > I can analyze the output of 'ifconfig', but isn't there an easier way. > > Thanks, > Rob. If reading the output of ifconfig is really too much trouble for you, then I would suggest writing up a small script or alias to grep the output of ifconfig. Nick