This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/16059] New: wordexp(3) -- A[0]='a b' gives error


https://sourceware.org/bugzilla/show_bug.cgi?id=16059

            Bug ID: 16059
           Summary: wordexp(3) -- A[0]='a b' gives error
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: opengeometry at yahoo dot ca
                CC: drepper.fsp at gmail dot com

Hi, I'm not sure if it's bug or just misunderstanding.  Given two
similar cases,

    wordexp ("one:  A[0]='a b'  end", &w, 0);   --> error=5 (WRDE_SYNTAX)
    wordexp ("one:  'A[0]=a b'  end", &w, 0);   --> ok

the result should be 3 strings,

    one:
    A[0]=a b
    end

just like shell.  Yet, I get error for the first case.  I think
wordexp() is getting confused about glob [0] which is followed by
<single-quote> and then <space>.
-- 
William

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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