rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Chris Siebenmann <cks@hawkwind.utcs.toronto.edu>
To: rc@archone.tamu.edu
Subject: My programming challenge: the motivation
Date: Sat, 18 Apr 1992 17:44:46 -0500	[thread overview]
Message-ID: <92Apr18.184500edt.2715@hawkwind.utcs.toronto.edu> (raw)

 I neglected to write out in full that newlines are allowed in the
string, and that all such newlines *must* be preserved. The motivation
for this exercise is to write code that can correctly handle *all*
filenames it may get handed, and manipulate the result. Consider, for
example, handing a loop of the form:
	for (i in $*) {
		x=`{basename $i .blorf}
		...
	}
a filename that has a newline in it. We can get the 'full' name back
from basename with
		x=`` () {basename $i .blorf}
but it will have an extraneous trailing newline on the end; we need to
be able to strip this off, while leaving everything else untouched.
And there's the problem.

	- cks


                 reply	other threads:[~1992-04-18 22:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=92Apr18.184500edt.2715@hawkwind.utcs.toronto.edu \
    --to=cks@hawkwind.utcs.toronto.edu \
    --cc=rc@archone.tamu.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).