From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17371 invoked by alias); 5 Jan 2009 13:51:27 -0000 Received: (qmail 17361 invoked by uid 22791); 5 Jan 2009 13:51:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f21.google.com (HELO mail-ew0-f21.google.com) (209.85.219.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Jan 2009 13:51:19 +0000 Received: by ewy14 with SMTP id 14so8314154ewy.2 for ; Mon, 05 Jan 2009 05:51:15 -0800 (PST) Received: by 10.210.119.16 with SMTP id r16mr17325861ebc.15.1231163475587; Mon, 05 Jan 2009 05:51:15 -0800 (PST) Received: from ?192.168.1.127? (oh-69-68-52-171.sta.embarqhsd.net [69.68.52.171]) by mx.google.com with ESMTPS id 5sm3537424eyf.47.2009.01.05.05.51.13 (version=SSLv3 cipher=RC4-MD5); Mon, 05 Jan 2009 05:51:14 -0800 (PST) Message-ID: <4962104F.5000703@elite-systems.org> Date: Mon, 05 Jan 2009 16:34:00 -0000 From: Robert Pendell User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Trick cmd.exe of Windows XP to run cygwin Batch Script. References: <20090104110730.GH4017@trikaliotis.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2009-01/txt/msg00103.txt.bz2 Hongyi Zhao wrote: > On Sun, 4 Jan 2009 12:07:31 +0100, Spiro Trikaliotis > wrote: > >> Hello, >> >> * On Sun, Jan 04, 2009 at 06:20:20PM +0800 Hongyi Zhao wrote: >> >>> I've some cygwin/bash scripts and I want to invoke them without log >>> into the Cygwin's bash terminal. Is this possible? >> d:\> bash -c ./myscript > > I've use the command: > > bash -c "help set" > > to find that bash accept the following option: > > -C If set, disallow existing regular files to be overwritten > by redirection of output. > > But, I cann't find the *-c* parameter used here, could you please give > me some hints? > >> Note that you might have to add the path to bash (c:\cygwin\bin\bash or >> similar) in case it is not in your path. Also, you might want/need to >> add --login or -l to the options of bash. > > Again, the bash's built-in help doesn't give me the abbr. *-l* for > *--login*, any hints on this? > > Regards, > For all of the above you probably wouldn't find anything in bash built-in help docs. You would find it in the man page for bash. Type 'man bash' in a cygwin window and you will find both -l and -c defined there. Just for reference... -l - Make bash act as if it had been invoked as a login shell. --login - Same as -l. -c string - If the -c option is present then commands are read from string. if there are arguments after the string, they are assigned to the positional parameters, starting with $0. http://cygwin.com/acronyms/#RTFM -- Robert Pendell shinji@elite-systems.org "A perfect world is one of chaos." Thawte Web of Trust Notary CAcert Assurer -- 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/