This is a discussion on Re: command reordering within the OpenSSH Development forums, part of the Networking and Network Related category; --===============1337932583== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1337932583== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! On Tue, Mar 01, 2005 at 09:07:24AM -0500, matthew sporleder wrote: > ssh myname@myhost 'printf %s: `hostname` ; ssh -V && printf %s: > `hostname` ; php -v' >=20 > Will return something like: >=20 > myhost:myhost:OpenSSH_3.5etcetcetc > 4.x.y >=20 >=20 > Why is ssh putting the printf's together? It doesn't - you have just overlooked that ssh -V sends its output to stderr, while printf and php -v send it to stdout. Changing your command line to ssh myname@myhost 'printf %s: `hostname` ; ssh -V 2>&1 && printf %s: `hostn= ame` ; php -v' should work. (Assuming something sh-compatible as your login shell, won't work that way with csh.) Ciao Thomas --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (IRIX64) iD8DBQFCJHnsJ+FIGCekM7URAtsFAKDWZbctYBJAsrXfNrUpJh eLPmtOqwCeJdzt uu3vtU7twjv119oDNjiCtF4= =IBgK -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- --===============1337932583== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@mindrot.org http://www.mindrot.org/mailman/listi...enssh-unix-dev --===============1337932583==-- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|