On Mon, May 08, 2000 at 04:29:54AM -0400, Tim Goodwin wrote: >> A more important issue IMHO is whether Rc should provide a built-in >> read function, similar to the one offered by most Bourne shells; > >There is no *need* to make `read' a builtin: see the EXAMPLES file in >the distribution for an alternative. One of rc's design goals is to >avoid unnecessary builtins. So, no, I don't think this is likely to >happen. > Unfortunately the example provided does not work the way 'read' does, and is an extra-process that needs to be spawned for each input line. >> one is whether it will ever make it possible not to export everything to >> the environment by default. > >I brought this up a few months ago, and the consensus seemed to be that >the current scheme works well enough in practice. Have you encountered >a problem? hmm ... not really. Mine is just a general concern. Currently I initialize every variable that I'm going to use in a script, right at the beginning of the program, somewhat like what you do with C whan you declare things first. That is because unless I maintain a global name-space I never know what a variable is going to contain when the program is called. Having a clean environment would be desirable in general. Anyway, the above is another minor issue, it may as well be that the current scheme is ok. What I _really_ miss is a 'read', or 'line', function, for record-oriented input, and I think this feeling is shared also by others. While things like 'test' are rarely called inside a loop, reading lines from a file is the opposite, and spawning an external process on each line sucks, especially when one uses the shell for writing Web CGI scripts, like I do. Beside all that, I am a long-time (Bourne) shell user, and I whish I had uncovered rc before :-) Anyway, just to give my two-cent and not just ask for things :-), here are a couple of functions to emulate often-used external processes like basename(1) and dirname(1). I've tried to mimic the respective utilities as closely as I could. Bug-fixes are welcome :-) bye -carlo -- I can read MIME or uuencoded e-mail attachments in PDF, Postscript, HTML, RTF or text formats. Please do not send Word or Excel files.