Eu instalei o guile
e consegui que ele executasse o código de três maneiras:
1
$ guile <<< "(+ 1 1)"
GNU Guile 2.0.9
Copyright (C) 1995-2013 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type ',show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type ',show c' for details.
Enter ',help' for help.
$1 = 2
$
2
$ echo "(+ 1 1)" | guile
GNU Guile 2.0.9
Copyright (C) 1995-2013 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type ',show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type ',show c' for details.
Enter ',help' for help.
$1 = 2
scheme@(guile-user)>
$
3
$ echo "(+ 1 1)" > guile.script
$ guile < guile.script
GNU Guile 2.0.9
Copyright (C) 1995-2013 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type ',show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type ',show c' for details.
Enter ',help' for help.
$1 = 2
$
Em todos os casos, retornei ao prompt de shell original (indicado pelas linhas $
nuas).