capture output of `ssh -V`to a variable

From: Loris Serena (Loris.Serena@esat.com)
Date: Tue Jul 20 2004 - 11:15:48 EDT


List,

This is one that deserves a SUMMARY when solved!

I'm trying to capture the output of ssh -V into a variable.

The command
SSH_VERSION=`/usr/local/bin/ssh -V`
actually returns the output of the command to the screen and nothing into
the variable!

$ SSH_VERSION=`ssh -V`
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
$ echo $SSH_VERSION

$

I've tried this on a Solaris 8 x86 with Open SSH 3.8.1 and also on a Solaris
9 SPARC with SUN_SSH 1.0
and got the same results on both boxes with ksh, sh or bash!!!

Even if I try something like:

ssh -V > pluto

I get

$ ssh -V > pluto
OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004
$ ls -l pluto
-rw-r--r-- 1 bb bb 0 Jul 20 16:12 pluto
$

Any idea, anyone?

Cheers

Loris

Esat Telecommunications Limited
is a wholly owned subsidiary of BT Group plc
Registered in Ireland, Registration No. 141524
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland

This electronic message contains information (and may contain files) from
Esat Telecommunications Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.esatbt.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:07 EDT