From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.libero.it ([193.70.192.51]) by hawkwind.utcs.toronto.edu with SMTP id <28923>; Tue, 13 Jun 2000 17:35:55 -0400 Received: from localhost (151.15.134.17) by smtp1.libero.it; 12 Jun 2000 18:37:03 +0200 Received: from carlos by localhost with local (Exim 2.05 #1 (Debian)) id 131XBA-0005jG-00; Mon, 12 Jun 2000 18:35:12 +0200 Date: Mon, 12 Jun 2000 12:35:12 -0400 From: Carlo Strozzi To: Tim Goodwin Cc: rc@hawkwind.utcs.toronto.edu Subject: Re: environment again Message-ID: <20000612183512.F20497@tango.texne.com> Reply-To: carlos@texne.com Mail-Followup-To: Tim Goodwin , rc@hawkwind.utcs.toronto.edu References: <4AcAAKEARTmN4wYA@ltsun0.star.le.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <4AcAAKEARTmN4wYA@ltsun0.star.le.ac.uk>; from tjg@star.le.ac.uk on Mon, Jun 12, 2000 at 04:23:55PM +0100 Organization: TeXne.COM On Mon, Jun 12, 2000 at 04:23:55PM +0100, Tim Goodwin wrote: | > { Col1='data1'; Col2='data2'; Col3='some-big-data' } | > [...] | > sed 's/__SPECIAL_TAG__/'^$Col3'/' page_template.html | | What's the problem with simply doing this? Is Col3 so enormous that | you're running into environment variable limits? Or are you worried | about performance? No, it is the former, i.e. size. Again, I'm not a C programmer but I noticed that with ksh(1) if a keep a large variable local it works fine, while exporting it to the environment produces the same problem that I get with rc(1), as I showed in my original posting on this thread. Anyway, having huge shell variables may indeed not be a good idea. That very thing (combined with the fact that is seems really hard to get you rc guys to change anything of that shell :-)) suggests that it is probably better to write such data out to a temporary file and handle it differently. | Finally, if I've understood correctly what you're trying to achieve, | there is a workaround, although it's rather ugly. | | eval 'Col3=() sed s/__SPECIAL_TAG__/'^$Col3^'/ page_template.html' Hmm ... wouldn't the following be equivalent ? Col3=() { sed 's/__SPECIAL_TAG__/'^$Col3^'/' page_template.html } bye --carlo -- I can read MIME or uuencoded e-mail attachments in PDF, Postscript, HTML, RTF or text formats. Please do not send Word, Excel or PowerPoint files.