mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 19:50:24 +02:00
"Scripting Examples" update.
* doc/ref/scheme-scripts.texi (Scripting Examples): Mention system* and open-pipe.
This commit is contained in:
parent
94d70684c1
commit
f3a1872703
1 changed files with 11 additions and 0 deletions
|
@ -402,6 +402,17 @@ $ ./choose 50 100
|
||||||
100891344545564193334812497256
|
100891344545564193334812497256
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
Finally, seasoned scripters are probably missing a mention of
|
||||||
|
subprocesses. In Bash, for example, most shell scripts run other
|
||||||
|
programs like @code{sed} or the like to do the actual work.
|
||||||
|
|
||||||
|
In Guile it's often possible get everything done within Guile itself, so
|
||||||
|
do give that a try first. But if you just need to run a program and
|
||||||
|
wait for it to finish, use @code{system*}. If you need to run a
|
||||||
|
sub-program and capture its output, or give it input, use
|
||||||
|
@code{open-pipe}. @xref{Processes}, and @xref{Pipes}, for more
|
||||||
|
information.
|
||||||
|
|
||||||
|
|
||||||
@c Local Variables:
|
@c Local Variables:
|
||||||
@c TeX-master: "guile.texi"
|
@c TeX-master: "guile.texi"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue