Hi,
When setting a variable with the output of a command, the content of
variable is not correct when passed through ssh command, but works fine
within a ssh session.
Looks like remote interactive session with ssh enter Cygwin (uname -s =
CYGWIN_NT-5.1), but remote command with ssh does not (uname -s =
Windows_NT)
And ideas would be appreciated!
My tests, executing same command line to highlight problem
The following remote ssh command fail ($a ends with '\r'):
ssh frgbuild@win32-xp-ps 'echo "`uname -a`" ; set -x ; a=`uname -r` ;
b=`uname -rs` ; echo "a=$a=EOA=" ; echo "b=$b=EOB=" ; set +x'
Windows_NT WIN32-XP-PS 5 01 586
++ uname -r
+ a=$'5\r'
++ uname -rs
=EOA=
=EOB=dows_NT 5
' b='Windows_NT 5
+ echo $'a=5\r=EOA='
=EOB=' 'b=Windows_NT 5
+ set +x
The following interactive ssh session is working:
ssh frgbuild@win32-xp-ps
$ echo "`uname -a`" ; set -x ; a=`uname -r` ; b=`uname -rs` ; echo
"a=$a=EOA=" ; echo "b=$b=EOB=" ; set +x
CYGWIN_NT-5.1 Win32-XP-PS 1.7.4(0.225/5/3) 2010-04-07 11:02 i686 Cygwin
++ uname -r
+ a='1.7.4(0.225/5/3)'
++ uname -rs
+ b='CYGWIN_NT-5.1 1.7.4(0.225/5/3)'
+ echo 'a=1.7.4(0.225/5/3)=EOA='
a=1.7.4(0.225/5/3)=EOA=
+ echo 'b=CYGWIN_NT-5.1 1.7.4(0.225/5/3)=EOB='
b=CYGWIN_NT-5.1 1.7.4(0.225/5/3)=EOB=
+ set +x
Philippe
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple