unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Damien Mattei <damien.mattei@gmail.com>
To: Tom Whitcomb <thomaswhitcomb@yahoo.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Shelling
Date: Thu, 18 Apr 2024 19:56:10 +0200	[thread overview]
Message-ID: <CADEOadcOkc4_KgV=cUbmOpPM4OSU38OQKURBCM8fX06fdr2bfQ@mail.gmail.com> (raw)
In-Reply-To: <1238226916.702419.1713458694879@mail.yahoo.com>

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
>


  reply	other threads:[~2024-04-18 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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   ` Damien Mattei [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADEOadcOkc4_KgV=cUbmOpPM4OSU38OQKURBCM8fX06fdr2bfQ@mail.gmail.com' \
    --to=damien.mattei@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=thomaswhitcomb@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).