X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=peGTtOT+iO3oSTG5ecNiiPqcl56RYM0QdZitg/qKCap rBK5bZPNmXJnpAzt60QaYrKXkzBxmB2GrHPramHd7Y+WIFFV5F4pd1DybiII7U2D OpBHLIhvDjAjR5AXKwXwtlv7/oqJOECwE1odjB28CZ++5XGD+CeMTwoSPg8vniEE = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=iujWdNkTzwtLdCw7O0IVG5jKoP8=; b=lbUebcPAGtyfwSucz BTgIgHh+5sU64V3xUqN49i6TKTmWlAoK1qG5wiGXy0fiqqA2o09Q1DUApvVL+RGr PlSOZvkpxqFnSL95tTwMpqHDdt1kkXqLE+zXnqDMznDQb2ifeaRLTeyJqrur88eY 3phqRYlM+VdxaZMD5sExhQpOTA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: Ishtar.tlinx.org Message-ID: <53628E43.2040707@tlinx.org> Date: Thu, 01 May 2014 11:11:15 -0700 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cygwin-bash compat/regression bug... startup line prob References: <535EBD61 DOT 5080109 AT tlinx DOT org> <535EC59E DOT 9080602 AT redhat DOT com> <5361E22D DOT 40408 AT tlinx DOT org> <5361ECA1 DOT 1040302 AT redhat DOT com> In-Reply-To: <5361ECA1.1040302@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Eric Blake wrote: > On 04/30/2014 11:57 PM, Linda Walsh wrote: >> Eric Blake wrote: >>> On 04/28/2014 02:43 PM, Linda Walsh wrote: >>> >>>>> cat bin/t.sh >>>> #!/bin/bash -u >> Um... it doesn't work with 1 argument either. > > Your context quoting is hard to follow. Here, you are complaining about > a she-bang with only one argument,... ---- I think we are on two different pages. While I had the example with -u + -x, later on in the same note, ----- > It has something to do with the "-u" switch -- the "-x" was > added to try to figure out why a script that had just > #!/bin/bash -u > died w/o executing a single line. ------------- > | > cat bin/t.sh > | #!/bin/bash -u -x > > which is indeed invalid usage]. ---- Not on linux, which you say cygwin follows. *YOU* quoted it saying: > On Linux, the entire string following the > interpreter name is passed as a single argument to the > interpreter, and this string can include white space. > A maximum line length of 127 characters is allowed for the first > line in a #! executable shell script. ---------- On linux, (and, thus on cygwin?), "#!/bin/bash -u -x -a -b -c" is passed as 1 argument to bash. I.e. the spaces don't break things into separate arguments on linux. So any line up to 127 characters is allowed and anything after the executable name is a single argument to the end of the line (or 127 chars total). I.e. the above is valid as well -- but it was the single "-u" switch that doesn't work. >>>> Also weird -- the interp line says "/bin/bash" not "/usr/bin/bash" >>>> as the shell, so why does the error come from /usr/bin/bash? >>> the answer to this question. >> --- >> ??? >> This isn't clear to me. If I am running /bin/bash, why did the error >> message >> say /usr/bin/bash? >> > > Because you weren't running /bin/bash at that point in time, but > /usr/bin/bash. Again, you snipped the relevant portion of your original ---- No...I was... the output at the top was from "t.sh", which had #!/bin/bash. But the error message says /usr/bin/bash. > mail: > > | > bash t.sh > > but that says to run 't.sh' using the 'bash' interpreter found first in > your PATH ---- But that is not the first example in the email nor the one that gave the /usr/bin/bash as the error message source. I said later, that "bash t.sh" worked.. (as well as /bin/bash t.sh)... it's only when invoked w/o specifying the interpreter on the command line. (i.e. going from the shebang line which says /bin/bash) So why doesn't a single argument work (-u?) -- 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