[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] bash shell script question
- To: list@xxxxxxxxxxxxx
- Subject: Re: [LUG] bash shell script question
- From: bad apple <mr.meowski@xxxxxxxx>
- Date: Fri, 2 Jan 2015 18:35:02 +0000
- Delivered-to: dclug@xxxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dcglug.org.uk; s=1412586362; h=Sender:Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:List-Unsubscribe:List-Id:Reply-To:Subject:In-Reply-To:References:To:MIME-Version:From:Date:Message-ID; bh=/clJqW2En/teUragWKi/ONFe4zNNW0VfR586gmSmyqc=; b=FRHzfKYqJGeEgPW3y8UXy0hTsaZ90dQBTYxCEx3YDqKKsmn9N1WdC/t9B914FBA09XghqskwjPgdHRjCDYHNxkcGOA5Fufpb5SU3KOMhi1TIbp6vX0WmUExIem8ERMMfIWnJNgcHgYgeZm94kJR7+HYTx6jrNDFZ4KtoSaOAM3E=;
On 02/01/15 18:10, Gordon Henderson wrote:
> On Fri, 2 Jan 2015, Martijn Grooten wrote:
Just another "I do it like this" post. hostname can return too much
information whereas this will *usually* get what you want:
ip route get 8.8.8.8 | awk 'NR==1 {print $NF}'
Obviously still not perfect but usually how I script it.
--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq