On Sat, May 12, 2012 at 10:37 PM, Nelson H. F. Beebe <[email protected]> wrote: > Nala Ginrut <[email protected]> writes today about adding a > function to return a string from a command executed by a shell, > because (system "...") only returns the exit status of the last > command. > > The one point that I think is important is the handling of whitespace. > > The Unix shells in their backquoted `cmd` and $(cmd) syntax normalize > the output of cmd to replace runs of whitespace [ \n\r\v\t]+ by single > spaces. > > For shell use, that is convenient. However, inside guile, it may be > more useful to preserve the whitespace as is, and particularly the > line breaks. >
Yes, I don't think we should handle whitespace for users either. And the "shell" in Ruby dosen't too. I think my implementation reflects this. > A user who wants whitespace collapsed to single spaces can easily do > so with a regexp substitution, and that could be facilitated by > providing a standard guile library function to do the job > consistently. > well, this could be interesting. Anyway, I think we should have an inner way to run shell first. > ------------------------------------------------------------------------------- > - Nelson H. F. Beebe Tel: +1 801 581 5254 > - > - University of Utah FAX: +1 801 581 4148 > - > - Department of Mathematics, 110 LCB Internet e-mail: [email protected] > - > - 155 S 1400 E RM 233 [email protected] [email protected] > - > - Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ > - > ------------------------------------------------------------------------------- >
