rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Carlo Strozzi <carlos@linux.it>
To: Tim Goodwin <tjg@star.le.ac.uk>
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: environment again
Date: Mon, 12 Jun 2000 12:35:12 -0400	[thread overview]
Message-ID: <20000612183512.F20497@tango.texne.com> (raw)
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

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. 


  reply	other threads:[~2000-06-13 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-08 19:02 Carlo Strozzi
2000-06-12 15:23 ` Tim Goodwin
2000-06-12 16:35   ` Carlo Strozzi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-06-08  7:19 Carlo Strozzi
2000-06-08 16:48 ` Decklin Foster
2000-06-07  6:53 Carlo Strozzi
2000-06-08  5:55 ` Decklin Foster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000612183512.F20497@tango.texne.com \
    --to=carlos@linux.it \
    --cc=carlos@texne.com \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=tjg@star.le.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).