From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2da5d5e41670269 X-Google-Attributes: gidfee84,public From: dblake@popper.ucsf.edu (David T. Blake) Subject: Re: wordexp (not Re: nanosleep ?) Date: 1999/08/25 Message-ID: #1/1 X-Deja-AN: 517221148 References: <37BCF41F.1EC5804D@de.ans.thomson-csf.com> <37C0ED14.9560FA43@psi.ch> <37C14023.B0712F05@compaq.com> Organization: UCSF, ITS User-Agent: slrn/0.9.5.4 (UNIX) Reply-To: dblake@phy.ucsf.edu Newsgroups: comp.unix.osf.osf1 David T. Blake wrote: > The issue really arises if ksh considers the environment from > which you call wordexp a restricted one, in which case ksh simply > does not do the expansion. That means the C library fails in a > miserable and confused way leaving you without word expansion > at all, and no errors reported by the routine. Hate to followup on my own post, but I realized that the real issue I wish to address is not clear in my posting. I really don't care too much how libc does the wordexp function as long as it works properly. It seems to work by executing the command ksh -c set -- ~/.Xdef*; echo $#; while [ $# -gt 0 ]; \ do echo "${#1}"; echo "$1"; shift; done Where ~/.Xdef* is the argument you wish to expand. Under some circumstances this fails, and I THINK this is due to ksh considering the shell environment restricted. I wish to know how to make the word expansion work all the time irrespective of the environment and program that call it. Any ideas ?? -- Dave Blake dblake@phy.ucsf.edu