Date: Wed, 2 Mar 2005 14:04:57 +0100 From: Mario Hoerich <lists@MHoerich.de> To: Jarrod - Cybertek <jarrod@cybertek.co.za> Cc: 'Kris Kennaway' <kris@obsecurity.org> Subject: Re: referencing in files Message-ID: <20050302130456.GA6144@Pandora.MHoerich.de> In-Reply-To: <20050302110159.E6E2F1FFC6D@overport.cybertek.co.za> References: <20050302102921.GA92791@xor.obsecurity.org> <20050302110159.E6E2F1FFC6D@overport.cybertek.co.za>
next in thread | previous in thread | raw e-mail | index | archive | help
# Jarrod - Cybertek: > > Say i have a file /root/setup.client.sh, and it has this line: > IFACE=ng10 > Now I want to have the motd, when it is displayed after login, to go fetch > the current value of that IFACE, and display that value. This probably won't get any points for style, but instead of using /etc/motd, you could just as well do this with a small script in your .zlogin/.login/whatever file. E.g. if [ ! -e .hushlogin ]; then IF=`awk '/IFACE *=/ { gsub(/IFACE *= */,""); print; }' setup.client.sh` echo "My interface: $IF" fi HTH Mario
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050302130456.GA6144>