This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: running programs.


Clark McGrew wrote:
> 
> Hello,
> 
>     Friedrich> What is your problem with that. I think it's Scheme
>     Friedrich> with extenstions to facilate Shell-programming so what
>     Friedrich> is the problem in scsh one can write (let ((ls-output
>     Friedrich> (run/strings (ls)))
> 
> Please correct me if I'm wrong, but as far as I understand you can't
> use run/strings as a pipe.  you need the "(run (| (prog) (prog)) (<
> file))" stuff (it's been a while since I've used scsh so i've probably
> got the syntax completely wrong).

Sorry,  I do not understand you correctly.

you can do a 
(run (| (ls) (grep linux )))

or you can run
(run/strings(| (ls) (grep whatever)))

and both work as intended. The run/strings catches the output in a list
of Strings 
So isn't that exactly what you want to have?

> 
> To my mind, scsh has tried to make scheme act like shell; however, for
> my purposes I would like to run programs in a "schemish" way.  For
> instance, scheme is a prefix language so I want pipes to be in prefix
> order.  (run "grep" (run "ls")), not "(run (| (grep) (ls))).

As mentioned above 
(run (| (ls) (grep))) 

just works fine. 

IMO Oliver has tried to hide shell-programming as far away and instead
offer a Scheme as Shell-Programming language. If you read his paper I
would be astonished to find that he want's a Schemeish access to the
Shell.

And BTW isn't (run (| ( .... prefix I can't see that there isn't it
looks in my eyes very simular to let's say '+' etc.

So why don't you take another look at scsh?

Regards
Friedrich

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]