cygwin shell scripting - how to pass values from command line to ssh remote command

John Hardin jhardin@impsec.org
Tue Oct 14 22:50:00 GMT 2008


On Tue, 14 Oct 2008, Dave Korn wrote:

> Thorsten Kampe wrote on 14 October 2008 21:11:
>
>>> ssh qa@load01 'export MAX_MS=100; export OFFSET_MS=89900; export
>>> THREADS=4; export RAMP=1; export LOOPS=2; echo load01 ; cd
>>> /cygdrive/c/apps/bin ; pwd ; nohup ./start.sh  \& ; ps -efW | grep
>>> java ; exit '
>
>>  Also the "pwd".
>
>  Surely not, if it's a bit of debugging trace that lets ZW know that the
> directory exists and so the cd command succeeded and there must be something
> else wrong if the script doesn't execute?

Wouldn't something along the lines of

     cd /cygdrive/c/apps/bin && nohup ./start.sh &

be a lot safer if you were worried about the directory not being there?

Working that into the one-liner is left as an exercise for the student... 
:)

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   Health Care _is_ a right - the government has no business keeping
   you from getting it. But forcing somebody else to pay for your
   health care at gunpoint (i.e. through taxation) is _not_ a right.
-----------------------------------------------------------------------
  21 days until the Presidential Election

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list