This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
wordexp(3) -- A[0]='a b' gives error
- From: William Park <opengeometry at yahoo dot ca>
- To: libc-alpha at sourceware dot org
- Cc: William Park <opengeometry at yahoo dot ca>
- Date: Thu, 17 Oct 2013 02:22:14 -0400
- Subject: wordexp(3) -- A[0]='a b' gives error
- Authentication-results: sourceware.org; auth=none
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