[nzlug] Variables??
Richard Thomas
tich at clad.co.nz
Thu Feb 1 04:23:39 NZDT 2007
Use backticks:
NEWVAR=`echo $R | cut -d ' ' -f 1 -`
On Thu, 1 Feb 2007, Nevyn wrote:
> Hi Guys,
>
> I've been playing around with the possibility of running applications
> off my Linux server onto a Windows machine for various reasons.
>
> Anyway, I've got an environment variable which has the following value in it:
> 192.168.0.247 4242 22
>
> I want just the ip address so I did something along the lines of:
> echo $SSH_CLIENT | cut -d ' ' -f 1 -
>
> which displays just the ip address. Now I'm trying to figure out how
> to get this as an environment variable.
>
> Thanks for the help in advance.
>
> _______________________________________________
> NZLUG mailing list NZLUG at linux.net.nz
> http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
>
More information about the NZLUG
mailing list