This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Newbie Questions
- From: Warren Young <warren at etr-usa dot com>
- To: Andrey Repin <cygwin at cygwin dot com>
- Date: Thu, 06 Feb 2014 13:34:00 -0700
- Subject: Re: Newbie Questions
- Authentication-results: sourceware.org; auth=none
- References: <1898639722 dot 6893470 dot 1391541591920 dot JavaMail dot root at ptd dot net> <52F153AE dot 5080704 at gmail dot com> <52F28215 dot 5030801 at ptd dot net> <52F28330 dot 6060101 at cygwin dot com> <52F2AA5D dot 4000000 at etr-usa dot com> <52F2AD84 dot 1050008 at etr-usa dot com> <709102296 dot 20140206020738 at mtu-net dot ru> <52F2D9AF dot 1060409 at etr-usa dot com> <11910654512 dot 20140206050031 at mtu-net dot ru> <52F2E214 dot 1060403 at etr-usa dot com> <2810090853 dot 20140206121352 at mtu-net dot ru>
On 2/6/2014 01:13, Andrey Repin wrote:
Greetings, Warren Young!
[C:\home\Daemon]$ bash -c ./foo.sh
That's not the same command I gave you. -c changes how bash.exe
interprets the following parameter.
According to `man bash', that's the correct command to execute scripts with
bash.
Are you trolling?
$ man bash
SYNOPSIS
bash [options] [file]
...
ARGUMENTS
If arguments remain after option processing, and neither the -c
nor the -s option has been supplied, the first argument is
assumed to be the name of a file containing shell commands.
In other words, bash behaves exactly as I said originally, and Windows
Explorer isn't wrong to call Bash with just the name of a script, when
you tell it that all *.sh open with bash.exe.
--
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