rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.astro.wisc.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: ifs
Date: Wed, 6 Oct 1993 02:55:20 -0400	[thread overview]
Message-ID: <9310060655.AA27246@oldp.astro.wisc.edu> (raw)

Whilst testing a read that performs ifs splitting, I discovered to my
surprise that ifs is not exported into the environment and so is
initialized to the standard space, tab, and newline whenever rc is
run.  One consequence of this is that the following two commands are
different:

	ifs = ( : $nl ) rc -c 'line = `{ sed 1q /etc/passwd } ; echo $line'
	rc -c 'ifs = ( : $nl ) ; line = `{ sed 1q /etc/passwd } ; echo $line'

Is this really the correct behaviour?  I can understand this choice
with regard to IFS and sh because of the IFS loophole, but this does
not apply to rc.


             reply	other threads:[~1993-10-06  6:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-10-06  6:55 Alan Watson [this message]
1993-10-06  7:21 ifs Byron Rakitzis
1993-10-06  8:48 ifs Alan Watson
1993-10-06 18:56 ifs Paul Haahr

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=9310060655.AA27246@oldp.astro.wisc.edu \
    --to=alan@oldp.astro.wisc.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /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).