From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AOmTI2T8PGODlQAAbAwnHQ (envelope-from ) for ; Wed, 05 Oct 2022 05:39:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EPKYI2T8PGPdPAEA9RJhRA (envelope-from ) for ; Wed, 05 Oct 2022 05:39:16 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4CFABA6AF for ; Wed, 5 Oct 2022 05:39:16 +0200 (CEST) Received: from localhost ([::1]:40886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofvFb-0007H8-FP for larch@yhetil.org; Tue, 04 Oct 2022 23:39:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofvFN-0007Gt-KK for help-guix@gnu.org; Tue, 04 Oct 2022 23:39:01 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:43546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofvFM-000289-79 for help-guix@gnu.org; Tue, 04 Oct 2022 23:39:01 -0400 Received: by mail-qt1-x836.google.com with SMTP id a25so359329qtw.10 for ; Tue, 04 Oct 2022 20:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date; bh=48r9/Ah0R9ch8CPXA8MyrCexja7wXMhYBiX//QVF+aI=; b=nVB/2nj38LPlFmX5pk/ZIwTL0xaDKG/wmynCPbV5/+9oTGjCwQZRM2t1+hMGC4jFXA gr+9iTOejcMs4HI7Iw5xhY31Fvzl/loODRQNHT6YAwtwHuCHkqVK58QMLFC1dNXDF1GS fQT05LR7O9o5UUNBT8w2XOAl1IuWXWJPO5U2lBpKccDm5xtF0k2pz8kf4E9DyD8da76T iuq5vsaQCVIx6EuNHxQ/x1x0SHPuT+D9OaMQpMw6HBGd1NvPL3UKDxnabJOlghZElmnk R5oJHxwZXZXn2YFoXMVFzcNL6g0tZffJIDgYuQ15dQYOguRk4glzEJPGBUI60HbvU8rH VmbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date; bh=48r9/Ah0R9ch8CPXA8MyrCexja7wXMhYBiX//QVF+aI=; b=MF+pxFW8WBL0/WeOHRk0xCp/GDBoVdSCtfkr54Y34NT5qUx4hevuVa+wKmm3UraFZd oY7GvI+C45hld6rUn/5VnCB7925qhKh/jf/etklvuNnxqAyNr/UQaaqZJppmypTSc3I6 Xl0kbv6YEa3hW1r/wQkk8FEqgbogMTjD6R3yj0H2uVczH/9SwASauPKAKq5te0OEOtQA NM1TINMNom0iF2BwyvbUHQ+nllHoBbtQBxTbKOGNTNSVRBY8tEq7q2ezoRn6OLzQwSEH K4Lr5xFROmOP1S8vD3pTkvEoi3dw4x72B+NX1Q7cp+CL7zBC+6QKLAO285bG6TZ0fWUJ ADDg== X-Gm-Message-State: ACrzQf3CJGvbCx7L3nEGqN/Z7b+WbUvK+JhFuJ7RV+Gpf/CQmHUWUZfZ HicPlvl53Qqg9LkbsIiyQKKVyohXs7k= X-Google-Smtp-Source: AMsMyM5CypBhv0hlO3k/TRi2+2WXi7YICbHkxH6fxMKyO2K3zRFPRgcy4CKC/kuo3BLWVZ5aw9ucBQ== X-Received: by 2002:a05:622a:1489:b0:38b:4ffe:1e14 with SMTP id t9-20020a05622a148900b0038b4ffe1e14mr3702654qtx.3.1664941138834; Tue, 04 Oct 2022 20:38:58 -0700 (PDT) Received: from hurd ([2607:fad8:4:3::1007]) by smtp.gmail.com with ESMTPSA id d19-20020a05620a241300b006ce9e880c6fsm16157728qkn.111.2022.10.04.20.38.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 20:38:58 -0700 (PDT) From: Maxim Cournoyer To: Olivier Dion via Cc: jordi , Olivier Dion Subject: Re: bash scripts in Guix question References: <871qrnk61s.fsf@laura> Date: Tue, 04 Oct 2022 23:38:57 -0400 In-Reply-To: <871qrnk61s.fsf@laura> (Olivier Dion via's message of "Tue, 04 Oct 2022 10:38:23 -0400") Message-ID: <871qrnj5wu.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x836.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664941156; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=48r9/Ah0R9ch8CPXA8MyrCexja7wXMhYBiX//QVF+aI=; b=eKFBA1lA0e9ZJfL3ooRsifO20uP3W+bPoGlO6/eHzuM+FBPEXctp64TtEbAytTN/IlCvRF 8ixFFsTLkI80gO/ys8ovUQS7niw4l76UH20nbdbAEWG3dgTA1LfhoewPtkWZ3N4OFNZ+Ow hRhInTCJrjBgfYSFieqHstSfysOykfwSKU9V++4adBHyT/U2z4anOKrBNpa9t4DuE+9Q+2 XQPTubt2Z1DbzitFJPE9ttHXz4f4VbQt3VKJIKIemsaVSGwpina30j6yurPpZZlUKMAuRK Mrn1r6nhYBwhtOyojBU2TAcv6IkarlO6hBBJQJUp9Ok0ywlJ1HIvC3ib17FE9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664941156; a=rsa-sha256; cv=none; b=g9fOVAgKem31DwPrFoQy3lDf+6sZB20lKsk34Ho3JwotLKLHF+2v2SNdTnt8zhA1HTQ/rR AuvXYbegTCWWMO/To3s+J28ZsS1hAqhaUvFVT9k9dR5ZV2F6vg7bX4HF/Ih8ARm06llcgW Iw3PxT9DLuULBLXJdMknWjshoNE1dMdMH7regu9CY2NHGOhtdD1PPTISQ1id31TlDDrnNd M7ZGcOTWniXx6drznGk1LzAiOHehMm48Ukg3Zv7VPTpwHb2QLpoTZgKDrlXF/OKReYXdqP C6mcaZB8qA90p5jMWqPCZ3UbG/yW/HWdV086uUa5vjes7sMEj39pHmsgKu5zrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="nVB/2nj3"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="nVB/2nj3"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4CFABA6AF X-Spam-Score: -2.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1XMurFvfoc98 Hi, Olivier Dion via writes: > On Tue, 04 Oct 2022, jordi wrote: >> Hi guixers, >> >> i'm wondering...for my scripts to work in Guix, instead of >> '#! /bin/bash' , >> > > Typically the `sh' program should be a symlinked to `bash' in your > system profile. I think it is the case for many distro. If you want it > to be bulletproof though for other distros maybe something like that: > > #!/bin/sh > if [ "$(basename $SHELL)" != "bash" ]; then > exec bash "$0" "$@" > fi > > echo "hey!" I prefer the "#!/usr/bin/env bash" shebang; /usr/bin/env is available on FHS distribution, and on Guix System, for convenience. You can use if for any interpreted script, such as Guile, Python, Perl, etc. -- Thanks, Maxim