From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <00a0d91965e54a4bfb03ea9070ed2e8b@coraid.com> From: erik quanstrom Date: Sat, 10 Mar 2007 07:32:30 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] How can I shift a variable other than ? MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 1f325cfe-ead2-11e9-9d60-3106f5b1d025 On Sat Mar 10 00:17:12 EST 2007, bsdaemon@comcast.net wrote: > On Fri, Mar 09, 2007 at 11:46:46PM -0500, erik quanstrom wrote: > >why wouldn't it be backwardly compatable? > >"(a b) = $*" is currently an error in rc. and i don't > >believe i've ever seen an rc script that depends on > >this error. > > The problem is that then new scrips wouldn't be portable. ya. right. is this this the same reason i should check my c code with the johnson c compiler (being very careful to not use function prototypes) to make sure it works everwhere? of course my code will probablly still be broken with the c73 compiler. hope nobody's still running that. and now that we've thought of it, we can't fix any rc bugs. since scripts that rely on fixed bugs won't run everwhere. c'mon. what kind of dusty-deck thinking is this? > but in that case, you may as well just use Inferno's sh doesn't run on plan 9. it's written in limbo and depends on features of inferno that are not part of plan 9. > or port es(1) es hasn't been maintained in a dozen years. there is a reason for this. while es has some great ideas and paul haahr did a really nice job with it. it seems to me that let and bindings make the shell harder to use. es implements a lot of functonality in es (and still breaks 10kloc of c). here's the definition of cd. es% whatis cd @ dir{if {~ <={%count $dir} 1} {$&cd $dir} {~ <={%count $dir} 0} {%seq {if {%not {~ <={%count $home} 1}} {throw error cd <={if {~ <={%count $home} 0} {result 'cd: no home directory'} {result 'cd: home directory must be one word'}}}} {$&cd $home}} {throw error cd 'usage: cd [directory]'}} - erik