[ 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: Martijn Grooten <martijn@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 Jan 2015 17:00:38 +0000
- Content-disposition: inline
- 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:MIME-Version:References:Message-ID:To:From:Date; bh=zDPyxwotuMaGmMtB/8TXzXWbG8uXp2MxCY1RHwqIM3I=; b=CfvKwddBhx0z8v0uC1T+fZHRSNqTZ+mhraJjkohb994IfqFItSsCxZxJUqnXtU+v2RaSGsb6pkMdym5IIztLopMtPxSQln17R4q+cXBLlfBPFvnAQIBM6X9JCYk6sLlSN4vPDmvALAVXa9H+WCirsgIbQ2oF3vyJo46GaGBnu4A=;
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=lapsedordinary.net; s=mail; t=1420218039; bh=g1CnKlnKmV6O7xk5+DLaN4XjAhqvGB+cUfrtXPQI6wM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=WoK3eIk3voWTafOYfXHAGGhtCaJampCADa6U+iFbStTEUk2A2v5oePTpZcgeilsKz JZ/xeSlCW1KuEEQIPy5f17eSCqY45pEdIJMyV1hl81252KrxSDOHDcFsPadFc30nM4 tXkfk3fM7a8OznKxS6Vo4K1EK6ssVJk99t8RbK/s=
On Fri, Jan 02, 2015 at 04:57:53PM +0000, Martijn Grooten wrote:
> On Fri, Jan 02, 2015 at 04:47:41PM +0000, Paul Sutton wrote:
> > 1. Put the out put to hostname -I as a variable and display that OR
> > 2 put the output as an environment variable e.g $HOSTNAME and
> > display that
> >
> > Just not sure on HOW to do this
>
> hostname=`hostname -I`; echo "Hostname: $hostname"
Actually,
echo "hostname:" `hostname -I`
is much better, and is a proper answer to 1.
Martijn.
--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq