public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Robert Pendell <shinji@elite-systems.org>
To: cygwin@cygwin.com
Subject: Re: Trick cmd.exe of Windows XP to run cygwin Batch Script.
Date: Mon, 05 Jan 2009 16:34:00 -0000	[thread overview]
Message-ID: <4962104F.5000703@elite-systems.org> (raw)
In-Reply-To: <mfo3m4944ovb7o06dbh8k2rl6kb2bfunl2@4ax.com>

Hongyi Zhao wrote:
> On Sun, 4 Jan 2009 12:07:31 +0100, Spiro Trikaliotis
> <an-cygwin@spiro.trikaliotis.net> 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/

  reply	other threads:[~2009-01-05 13:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 10:37 Hongyi Zhao
2009-01-04 11:07 ` Frank Fesevur
2009-01-04 13:09   ` Jeenu V
2009-01-05 11:27   ` Hongyi Zhao
2009-01-06 17:54     ` Frank Fesevur
2009-01-07  5:33       ` Jared Silva
2009-01-08 10:34       ` Hongyi Zhao
2009-01-04 17:10 ` Spiro Trikaliotis
2009-01-05 11:32   ` Hongyi Zhao
2009-01-05 16:34     ` Robert Pendell [this message]
2009-01-06 17:49       ` Hongyi Zhao
2009-01-05 12:43   ` Hongyi Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4962104F.5000703@elite-systems.org \
    --to=shinji@elite-systems.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).