From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0B0E11381F3 for ; Tue, 11 Dec 2012 12:00:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D7AD21C0B1; Tue, 11 Dec 2012 11:59:46 +0000 (UTC) Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1CE76E05FA for ; Tue, 11 Dec 2012 11:58:28 +0000 (UTC) Received: by mail-ea0-f181.google.com with SMTP id k14so1531066eaa.40 for ; Tue, 11 Dec 2012 03:58:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:organization :x-mailer:mime-version:content-type:content-transfer-encoding; bh=SXt28iopbeigpJ37gEnMwIUGUBWyS78hS2+RSg6rMoQ=; b=tFdIoYn/a3LmvolBrQx/fJjt/yqlgAEl56YIGhKojhMORuI+wDqLPqXlDKnzY5vqQ7 i2HxUlgJYZgUXyIHzZ8MYBXuhTPz0+ArFJYE39NpbIsQGw9GwoONPPhVHpgnz0F7WKDz 3RxOoqqtwrTGpIhOV/gBCXng9fEZM57ZyS7IJ5Z+FbvnGOuXE67jPLMNxFJPhasa1+B9 VSxsZIM3sZ3M7GWo6SZP+w+rkrtODWP1jyl8SrpMGmmFhsRgVt8XuX2Xz7pj7CQPMfu9 OlseYc4a9b3eoqrrto5uv3h2EWyRaupKzB43vIHSOKM1EjqP+cCQlBsJea7YzVWFdhNN CIJg== Received: by 10.14.205.198 with SMTP id j46mr60160488eeo.27.1355227107610; Tue, 11 Dec 2012 03:58:27 -0800 (PST) Received: from khamul.example.com (196-215-209-117.dynamic.isadsl.co.za. [196.215.209.117]) by mx.google.com with ESMTPS id e2sm49422287eeo.8.2012.12.11.03.58.25 (version=SSLv3 cipher=OTHER); Tue, 11 Dec 2012 03:58:26 -0800 (PST) Date: Tue, 11 Dec 2012 13:55:03 +0200 From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] ifconfig and ppp0 address Message-ID: <20121211135503.43a08568@khamul.example.com> In-Reply-To: <1355225595.25046.5.camel@bunyip> References: <1355225595.25046.5.camel@bunyip> Organization: Internet Solutions X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 45ff0323-792a-4052-a9ca-34bf34ab38c4 X-Archives-Hash: 5eeb710d81d20bed332e4376e3c1ebb8 On Tue, 11 Dec 2012 19:33:15 +0800 Bill Kenworthy wrote: > For years I have been using ifconfig and some simple shell magic to > extract the ip address from the adsl ppp session when it changes. The > latest update has changed the output format of ifconfig breaking > things so if ifconfig cant be relied on, what's normally used to > extract an interfaces IP address? I can easily rewrite the shell > magic, but its worth asking if there is some command better suited. > > BillK > > > ip tends to be a little more consistent and a little more script-friendly than ifconfig: ip -o addr show -o prints output on one line, making your subsequent grep, sed and awking easier -- Alan McKinnon alan.mckinnon@gmail.com