This is the mail archive of the libc-alpha@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]

wordexp(3) -- A[0]='a b' gives error


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


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