Nala Ginrut <nalagin...@gmail.com> 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.  

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.

-------------------------------------------------------------------------------
- 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: be...@math.utah.edu  -
- 155 S 1400 E RM 233                       be...@acm.org  be...@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------

Reply via email to