This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change in behavior of bash / if [


On 12/18/2013 07:18 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:

>>> if [ "x$1" = xclip ]
>>
>> Yes, this is the correct fix for the improper quotation of the earlier
>> example.
> 
> But why would it need quoting unless the first argument unless the
> command line is quoted and might have a space"?  It wasn't.  It was
> called from a script that was being sourced by a bash interactive shell
> as follows.
> 
> lddir clip

I'd need to see your entire script to know for sure.  Perhaps you are
using calls to 'set' or using shell functions, either of which modifies
$1 from the value that you passed on the command line.  But the point
remains - your improper quoting of $1 is not a cygwin-specific issue.

> Speculation:  Since cygwin1.dll was updated last week, perhaps
> something happened there.

Less likely.  But without seeing your entire script, it's hard to say.
You haven't given anyone else enough to go on.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]