X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <ff8e9dfe0801140608h260c2bc9x9bfc83f127208eca@mail.gmail.com>
Date: Mon, 14 Jan 2008 15:08:39 +0100
From: "Mirco Piccin" <pictux@gmail.com>
To: cygwin@cygwin.com
Subject: Re: How can I run a script?
In-Reply-To: <032e01c856b3$3f406a60$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <787dcac20801131641m59f7161ehf8bb2e1fcfbddc30@mail.gmail.com> 	 <478B653E.4010903@byu.net> 	 <032e01c856b3$3f406a60$2e08a8c0@CAM.ARTIMI.COM>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hi.

> can login to a shell from windows and run commands but how do I create a script

I think you mean to run a command without open cygwin shell.
If i understand well, here you are how i've done that.

First of all, i've created a file .bat (example: run_rsynch.bat) on my desktop
.. and inside that (supposing you install cygwin in your C: drive):

C:

chdir C:\cygwin\bin



bash --login -i -c 'rsync -avz root@10.0.0.2:/home/funnel/Jan*
/cygdrive/e/Earchives'

Save & Exit.
Now you need only to double-click in your .bat file and insert your
password if required.

Instead, if you want to create a  script to run in cygwin environment,
follow the Eric post.

...my 2 cents...

Regards
M

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

