unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Shelling
       [not found] <1238226916.702419.1713458694879.ref@mail.yahoo.com>
@ 2024-04-18 16:44 ` Tom Whitcomb via General Guile related discussions
  2024-04-18 17:56   ` Shelling Damien Mattei
                     ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tom Whitcomb via General Guile related discussions @ 2024-04-18 16:44 UTC (permalink / raw)
  To: Guile User

Hi.
I need to write a set of shell scripts and I would really like to do it with a lisp.  Is that a use case for guile or should I move towards scheme/scsh?
Tom


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 16:44 ` Shelling Tom Whitcomb via General Guile related discussions
@ 2024-04-18 17:56   ` Damien Mattei
  2024-04-18 23:28   ` Shelling Matt Wette
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Damien Mattei @ 2024-04-18 17:56 UTC (permalink / raw)
  To: Tom Whitcomb; +Cc: Guile User

hello Tom,
i use sometimes guile as a shell script, your file should start with:

#!/usr/local/bin/guile -s
!#

and after the scheme code
for example :

(define stderr (current-error-port))

; parse the input file from command line
(define cmd-ln (command-line))
(define args (cdr cmd-ln))

(when (member "--help" options)
....

etc

regards,
Damien

On Thu, Apr 18, 2024 at 6:45 PM Tom Whitcomb via General Guile related
discussions <guile-user@gnu.org> wrote:

> Hi.
> I need to write a set of shell scripts and I would really like to do it
> with a lisp.  Is that a use case for guile or should I move towards
> scheme/scsh?
> Tom
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 16:44 ` Shelling Tom Whitcomb via General Guile related discussions
  2024-04-18 17:56   ` Shelling Damien Mattei
@ 2024-04-18 23:28   ` Matt Wette
  2024-04-18 23:43     ` Shelling Tom Whitcomb via General Guile related discussions
  2024-04-19  1:51   ` Shelling Ahmed Khanzada via General Guile related discussions
  2024-04-19 10:30   ` Shelling Arun Isaac
  3 siblings, 1 reply; 7+ messages in thread
From: Matt Wette @ 2024-04-18 23:28 UTC (permalink / raw)
  To: guile-user

On 4/18/24 9:44 AM, Tom Whitcomb via General Guile related discussions 
wrote:
> Hi.
> I need to write a set of shell scripts and I would really like to do it with a lisp.  Is that a use case for guile or should I move towards scheme/scsh?
> Tom

You may be interested in gash: https://savannah.nongnu.org/projects/gash/



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 23:28   ` Shelling Matt Wette
@ 2024-04-18 23:43     ` Tom Whitcomb via General Guile related discussions
  2024-04-19  6:08       ` Shelling Damien Mattei
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Whitcomb via General Guile related discussions @ 2024-04-18 23:43 UTC (permalink / raw)
  To: guile-user@gnu.org, Matt Wette

 Thanks all.  Very helpful.
Tom
    On Thursday, April 18, 2024 at 04:29:36 PM PDT, Matt Wette <matt.wette@gmail.com> wrote:  
 
 On 4/18/24 9:44 AM, Tom Whitcomb via General Guile related discussions 
wrote:
> Hi.
> I need to write a set of shell scripts and I would really like to do it with a lisp.  Is that a use case for guile or should I move towards scheme/scsh?
> Tom

You may be interested in gash: https://savannah.nongnu.org/projects/gash/

  


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 16:44 ` Shelling Tom Whitcomb via General Guile related discussions
  2024-04-18 17:56   ` Shelling Damien Mattei
  2024-04-18 23:28   ` Shelling Matt Wette
@ 2024-04-19  1:51   ` Ahmed Khanzada via General Guile related discussions
  2024-04-19 10:30   ` Shelling Arun Isaac
  3 siblings, 0 replies; 7+ messages in thread
From: Ahmed Khanzada via General Guile related discussions @ 2024-04-19  1:51 UTC (permalink / raw)
  To: Tom Whitcomb via General Guile related discussions; +Cc: Tom Whitcomb

Not discouraging you from gash, but babashka is pretty good for this
too: https://babashka.org/



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 23:43     ` Shelling Tom Whitcomb via General Guile related discussions
@ 2024-04-19  6:08       ` Damien Mattei
  0 siblings, 0 replies; 7+ messages in thread
From: Damien Mattei @ 2024-04-19  6:08 UTC (permalink / raw)
  To: Tom Whitcomb; +Cc: guile-user@gnu.org, Matt Wette

i did not understood you where searching a shell in scheme...
so going further it seems to exist a sort of terminal in scheme too:
http://domterm.org/index.html
it is for Kawa scheme not guile, but i never test it, i can not provide any
feed back....
Damien

On Fri, Apr 19, 2024 at 1:43 AM Tom Whitcomb via General Guile related
discussions <guile-user@gnu.org> wrote:

>  Thanks all.  Very helpful.
> Tom
>     On Thursday, April 18, 2024 at 04:29:36 PM PDT, Matt Wette <
> matt.wette@gmail.com> wrote:
>
>  On 4/18/24 9:44 AM, Tom Whitcomb via General Guile related discussions
> wrote:
> > Hi.
> > I need to write a set of shell scripts and I would really like to do it
> with a lisp.  Is that a use case for guile or should I move towards
> scheme/scsh?
> > Tom
>
> You may be interested in gash: https://savannah.nongnu.org/projects/gash/
>
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Shelling
  2024-04-18 16:44 ` Shelling Tom Whitcomb via General Guile related discussions
                     ` (2 preceding siblings ...)
  2024-04-19  1:51   ` Shelling Ahmed Khanzada via General Guile related discussions
@ 2024-04-19 10:30   ` Arun Isaac
  3 siblings, 0 replies; 7+ messages in thread
From: Arun Isaac @ 2024-04-19 10:30 UTC (permalink / raw)
  To: Tom Whitcomb; +Cc: Guile User


Hi Tom,

I do write my shell scripts in Guile. For added nicety, I usually deploy
these scripts using Guix's G-expressions. This lets you easily manage
the dependencies of that script, and deploy to remote machines
effortlessly. See
https://systemreboot.net/post/deploy-scripts-using-g-expressions for
more details if you're interested.

Here's a more complex example of a guile script:
https://issues.genenetwork.org/topics/deploy/uthsc-vpn-with-free-software
This script connects to a university VPN. The script couldn't have come
together so nicely without Guile or Guix. The complete script itself is
at https://issues.genenetwork.org/topics/deploy/uthsc-vpn.scm

Cheers!
Arun



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-19 10:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1238226916.702419.1713458694879.ref@mail.yahoo.com>
2024-04-18 16:44 ` Shelling Tom Whitcomb via General Guile related discussions
2024-04-18 17:56   ` Shelling Damien Mattei
2024-04-18 23:28   ` Shelling Matt Wette
2024-04-18 23:43     ` Shelling Tom Whitcomb via General Guile related discussions
2024-04-19  6:08       ` Shelling Damien Mattei
2024-04-19  1:51   ` Shelling Ahmed Khanzada via General Guile related discussions
2024-04-19 10:30   ` Shelling Arun Isaac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).