Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id CADA7225E6E for <~alpine/users@lists.alpinelinux.org>; Tue, 19 Nov 2024 19:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=citron; t=1732043022; x=1732709688; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: mime-version:content-type:content-transfer-encoding:author:from:subject: date:to:cc:resent-author:resent-date:resent-from:resent-sender:resent-to: resent-cc:resent-reply-to:resent-message-id:in-reply-to:references: mime-version:content-type:content-transfer-encoding:content-disposition: content-id:content-description:message-id:mail-followup-to:openpgp: blahblahblah; bh=Np/HO8NtT4wYMsm7DHBmeBKNwPK3Q98M6frs0Gra1Hs=; b=IfcECBkBwxbXDO/Sy/afN15S7kNG+ieLsS31eufglcPjUKtQ0RTkDJiYUPt3FHFn4NanN6YP 0Vfudw3EC7527qXCkDhBNuP8sQ0FYUmyStyKWQOhlXP4bOgsDRhvrtLojZ6g6q3k74yUu5Mbyc 9gcIVefLLbYiVp0Bz64k5hzJRrm62bbAXbL8UpgM4h33MPS/w7Ul60gJ6mhutLvHkoq8wZT/JW 2xQQiGbsn37mBXLodlLOcIuxf4SFwA9eMt72ESqgjlI2/NNbJkMwYF0DhDmrmWcz47tdf/vygw e+p3QRqRsz+VohJK1gxmTtdfgMK6NWx6V4CtO6MMuiVhyoDw== DKIM-Signature: v=1; a=adaed25519-sha256; c=relaxed/relaxed; d=sdaoden.eu; s=orange; t=1732043022; x=1732709688; h=date:author:from:to:cc:subject: message-id:in-reply-to:references:mail-followup-to:openpgp:blahblahblah: mime-version:content-type:content-transfer-encoding:author:from:subject: date:to:cc:resent-author:resent-date:resent-from:resent-sender:resent-to: resent-cc:resent-reply-to:resent-message-id:in-reply-to:references: mime-version:content-type:content-transfer-encoding:content-disposition: content-id:content-description:message-id:mail-followup-to:openpgp: blahblahblah; bh=Np/HO8NtT4wYMsm7DHBmeBKNwPK3Q98M6frs0Gra1Hs=; b=CyZzac9VHM50fEwubaVlIqaIFJCUvVnbOkupbvC1eHPytj1aLLQ1StrQKm/YEoLeRoXKG/FM yWgqRy+uuMosDQ== Date: Tue, 19 Nov 2024 20:03:40 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Paul Zillmann Cc: "~alpine/users@lists.alpinelinux.org" <~alpine/users@lists.alpinelinux.org> Subject: Re: Resources for learning shell scripting Message-ID: <20241119190340.nHqfWGEL@steffen%sdaoden.eu> In-Reply-To: References: Mail-Followup-To: Paul Zillmann , "~alpine/users@lists.alpinelinux.org" <~alpine/users@lists.alpinelinux.org> User-Agent: s-nail v14.9.25-628-g13af0798b7 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Paul Zillmann wrote in : |recently I have to write a bit of shell scripts and I find myself with=20 |the problem of finding solutions online that are compatible with GNU=20 |bash, but not with busyboxes POSIX shell. |So I would spend a bit of time to adapt those scripts to be able to run= =20 |with /bin/ash. | |Could you recommend any good resources to learn how to script for POSIX= =20 |in the first place? |Are there any good websites, books or even man pages available? | |I'm not a very good bash scripter myself, usually I work with compiled=20 |languages like C and Golang. Sven Mascheck is "an instance" regarding history of shell and compatibility, used even by shell standard developers like Chet Ramey (bash), dear J=C3=B6rg Schilling (bosh), and other shell experts like Stephane Chazelas: https://www.in-ulm.de/~mascheck/ Other than that it is a good idea to write scripts in shells which are dedicated to POSIX compatibility, like dash. (I have no idea of those "shell-check" tools which exist, many swear by them.) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) | |And in Fall, feel "The Dropbear Bard"s ball(s). | |The banded bear |without a care, |Banged on himself fore'er and e'er | |Farewell, dear collar bear