From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13675 invoked by alias); 28 Apr 2014 20:43:22 -0000 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 Received: (qmail 13557 invoked by uid 89); 28 Apr 2014 20:43:21 -0000 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 Received: from ishtar.tlinx.org (HELO Ishtar.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 28 Apr 2014 20:43:20 +0000 Received: from [192.168.4.12] (Athenae [192.168.4.12]) by Ishtar.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id s3SKhDut059201 for ; Mon, 28 Apr 2014 13:43:16 -0700 Message-ID: <535EBD61.5080109@tlinx.org> Date: Mon, 28 Apr 2014 20:43:00 -0000 From: Linda Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: "cygwin@cygwin.com" Subject: cygwin-bash compat/regression bug... startup line prob Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00633.txt.bz2 This 'used' to work...but doesn't now: -- running bash with the "-u" flag: > t.sh /usr/bin/bash: - : invalid option Usage: /usr/bin/bash [GNU long option] [option] ... /usr/bin/bash [GNU long option] [option] script-file ... GNU long options: --debug --debugger --dump-po-strings --dump-strings --help --init-file --login --noediting --noprofile --norc --posix --protected --rcfile --restricted --verbose --version --wordexp Shell options: -irsD or -c command or -O shopt_option (invocation only) -abefhkmnptuvxBCHP or -o option > which t.sh /Users/law.Bliss/bin/t.sh > cat bin/t.sh #!/bin/bash -u -x echo "Hello World" > ----------------------------- 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. If I run it via: > bash t.sh Hello World > ---works--- 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? It doesn't when I do it interactively: > /bin/bash - - /bin/bash: -: No such file or directory --- or 'bash' alone: > bash - - bash: -: No such file or directory ---- Ideas? would a cygcheck be of any use? Note, if I combine the switches (-ux), it works -- but I only added the '-x' to debug why '-u' didn't work. > uname -a CYGWIN_NT-6.1 Athenae 1.7.29(0.272/5/3) 2014-04-07 13:46 x86_64 Cygwin > bash --version GNU bash, version 4.1.11(2)-release (x86_64-unknown-cygwin) --- This, also, doesn't work: > echo t.sh|bash -i #(with or without '-i') #note -- first some unrelated output from confused startup scripts: User Bliss\law's .bashrc called 2nd time /usr/bin/stty: standard input: Inappropriate ioctl for device /usr/bin/stty: standard input: Inappropriate ioctl for device dirname: extra operand `a' Try `dirname --help' for more information. ## here is the 'echo' being read into bash: law.Bliss> t.sh /usr/bin/bash: - : invalid option Usage: /usr/bin/bash [GNU long option] [option] ... /usr/bin/bash [GNU long option] [option] script-file ... GNU long options: ... ----- -- 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