From: "ara.t.howard" Date: 2008-08-13T07:32:19+09:00 Subject: Re: Sigh! I'm depressed. Debian vs Ruby and the backtick and subshells On Aug 12, 2008, at 3:10 PM, John Carter wrote: > On Tue, 12 Aug 2008, ara.t.howard wrote: > >> i could easily be wrong, but i have a dim recollection that the >> location of sh is a POSIX standard itself. >> >> backticks seem to respect the SHELL var here >> >> cfp:~ > SHELL=tcsh ruby -e' puts `echo $SHELL 2>out` ' >> tcsh > > At risk of being a little rude to one who doesn't deserve it, I > couldn't resist (purely for humorous reasons) framing my illustration > of the problem with that line like so.... > > I_AM_EASILY_WRONG='yes you are :-)' ruby -e' puts `echo > $I_AM_EASILY_WRONG 2>out`' > yes you are :-) > > > The location at /bin/sh is standard and fixed. SHELL is what you set > that users default shell to in your /etc/password. > > In unix Ruby backtick ignores ENV["SHELL"] and just runs whatever is > at /bin/sh > > > John Carter Phone : (64)(3) 358 6639 > Tait Electronics Fax : (64)(3) 359 4632 > PO Box 1645 Christchurch Email : john.carter@tait.co.nz > New Zealand > > heh - right you are! a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama