From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp3.libero.it ([193.70.192.53]) by hawkwind.utcs.toronto.edu with SMTP id <28499>; Thu, 8 Jun 2000 00:47:52 -0400 Received: from LocalHost (151.15.154.27) by smtp3.libero.it; 7 Jun 2000 09:34:41 +0200 Received: from carlos by localhost with local (Exim 2.05 #1 (Debian)) id 12zZit-000170-00; Wed, 7 Jun 2000 08:53:55 +0200 To: rc@hawkwind.utcs.toronto.edu Subject: environment again Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Mailer: mailx v8.1.1 ;-) Reply-To: carlos@texne.com Organization: TeXne.COM Message-Id: From: Carlo Strozzi Date: Wed, 7 Jun 2000 02:53:55 -0400 Hi all, a few weeks back I started a thread on the fact that rc should provide a way of not exporting variables to the environment. There seemed to be a general position that the current behaviour is ok. I think it isn't, though: ; ls -l bigfile -rw-r--r-- 1 carlos carlos 660226 May 8 14:13 bigfile ; a=`{cat bigfile} ; echo $a |wc -c wc: Argument list too long Any command after that fails with the same message, presumably because of the bloated environment. That was tested on AIX and Linux. I have tested it also with a=``(){cat bigfile}, if that matters. Doing the same with ksh: $ a="`cat bigfile`" echo "$a" | wc -c 660226 $ So no problem, so far. Then: $ export a $ /bin/echo x ksh: /bin/echo: Argument list too long Again, a bloated environment does give problems, but the fact that ksh does not export things by default is a plus here. "Well, why don't you just use ksh then?" some of you may say. Because I rather like the philosophy behind rc, I just would like it not to have those very few defects. If I were a C programmer I would try to fix it myself, but even so I would need to convince the rc people if I wanted to have those changes included into the mainstram code. As a final note, making rc swallow a large file all in one go would not be necessary if it had a 'read' function, for line-oriented input, which was the other thread of mine on this list. --carlo