public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Unable to execute local scripts to run commands through SSH from Cygwin
@ 2014-09-09 22:20 Jim Reswick
  2014-09-10  0:43 ` Ken Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Jim Reswick @ 2014-09-09 22:20 UTC (permalink / raw)
  To: cygwin

Hi:

I'm trying to run a command string on a Linux box from a Winows 2008 box. 
I've got Cygwin64 installed and ssh working with public keys. I have two 
test scripts on the Windows box. The first script contains the command 
line that I desire to execute on the Linux box. The second script calls 
the first script passing the command line in the first script to the Linux 
box for execution (at least that is what is intended).

Here is the first script executed in the Cygwin session on the Windows box:

srv_imgctrlmsqladmin@RCOVSVR0414 ~
$ . /home/srv_imgctrlmsqladmin/test2.sh
hello world

Here is the command line from the second script copied and pasted and 
executed in the Cygwin session:

srv_imgctrlmsqladmin@RCOVSVR0414 ~
$ /bin/ssh rcolnx89114 -l sukpewek 'bash -s' 
< /home/srv_imgctrlmsqladmin/test2.sh
hello world

Here is what I get when I execute the second script in the Cygwin session 
(that contains only the same command line as above):

srv_imgctrlmsqladmin@RCOVSVR0414 ~
$ . /home/srv_imgctrlmsqladmin/call_test.sh
: No such file or directorydmin/test2.sh

I've tried several other variations of the same process above, but its 
always the same thing...Command line works fine on the remote Linux box, 
but the script calling the identical command line does not.

I'm a newbie and no great Unix script coder, and any help would be much 
appreciated...

Jim 
         

jreswick 
View Public Profile 
View LQ Blog 
View Review Entries 
View HCL Entries 
Find More Posts by jreswick 
Add jreswick to Your Contacts 



--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unable to execute local scripts to run commands through SSH from Cygwin
  2014-09-09 22:20 Unable to execute local scripts to run commands through SSH from Cygwin Jim Reswick
@ 2014-09-10  0:43 ` Ken Brown
  2014-09-10 20:41   ` Jim Reswick
  0 siblings, 1 reply; 3+ messages in thread
From: Ken Brown @ 2014-09-10  0:43 UTC (permalink / raw)
  To: cygwin

On 9/9/2014 6:08 PM, Jim Reswick wrote:
> Here is what I get when I execute the second script in the Cygwin session
> (that contains only the same command line as above):
>
> srv_imgctrlmsqladmin@RCOVSVR0414 ~
> $ . /home/srv_imgctrlmsqladmin/call_test.sh
> : No such file or directorydmin/test2.sh

Does your script have DOS line endings?

Ken


--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Unable to execute local scripts to run commands through SSH from Cygwin
  2014-09-10  0:43 ` Ken Brown
@ 2014-09-10 20:41   ` Jim Reswick
  0 siblings, 0 replies; 3+ messages in thread
From: Jim Reswick @ 2014-09-10 20:41 UTC (permalink / raw)
  To: cygwin

Ken Brown <kbrown <at> cornell.edu> writes:

> Does your script have DOS line endings?
> 
> Ken
> 
> 


Hi Ken:

Bingo!  Thanks for your help!

Jim


--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-10 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-09 22:20 Unable to execute local scripts to run commands through SSH from Cygwin Jim Reswick
2014-09-10  0:43 ` Ken Brown
2014-09-10 20:41   ` Jim Reswick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).