scsh-users
[Top] [All Lists]

Re: FIX for make problem

To: bdc@ai.mit.edu
Subject: Re: FIX for make problem
From: Bill Sommerfeld <sommerfeld@apollo.hp.com>
Date: Thu, 03 Nov 1994 16:37:16 -0500
Cc: scsh-bugs@martigny.ai.mit.edu
Thanks, that fixed the problem I was having.

Just FYI, I have just successfully used scsh to write a couple of
quick & dirty scripts which I would otherwise have written in perl or ksh..
Good job, guys..

Here are some suggested additions:

        0) faster startup (I don't really care how you do it...)

        1) a function similar to the BSD `mkstemp' C library function,
which returns an new open, empty, new file and an open descriptor.

proposal:

        (open-temporary-file [prefix]) -> [port string]

        Open a new, unique temporary file, guaranteed not to be used
        before, and return both a write port to that file and the name
        of that file.

        Sure, I could write this in terms of temp-file-iterate, but so
        can you :-).
        
        2) a rough equivalent of perl's `s///' primitive for
string-editing.  I'm not quite sure what the right way to cast this
into scheme syntax is, but this kind of operation is very common in
UNIX scripts, and one should not need to construct this sort of thing
out of primitive string operations.  The MIT Scheme string ops are
good in their own right, but don't always match what you're trying to
do.  Here's the sort of thing I'm looking for:

        (string-edit <string> <pattern>
                     <replacement-specifier>
                     [<flags>]) -> string.

        <string> is the source string.
        <pattern> is a regular expression.
        <replacement-specifier> is ???
                (another implicitly backquoted form??)
        <flags> turns on one or more of the following options:
                - iterate       (repeat the edit, starting with end of
                                last match, until no more matches)
                - case-insensitive (case-insensitive match)

<Prev in Thread] Current Thread [Next in Thread>