rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* My programming challenge: the motivation
@ 1992-04-18 22:44 Chris Siebenmann
  0 siblings, 0 replies; only message in thread
From: Chris Siebenmann @ 1992-04-18 22:44 UTC (permalink / raw)
  To: rc

 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-04-18 22:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-04-18 22:44 My programming challenge: the motivation Chris Siebenmann

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).