Received: from fhigh-b3-smtp.messagingengine.com (fhigh-b3-smtp.messagingengine.com [202.12.124.154]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id 0FBA8225DD6 for <~alpine/users@lists.alpinelinux.org>; Tue, 19 Nov 2024 20:35:07 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5025D25400DE for <~alpine/users@lists.alpinelinux.org>; Tue, 19 Nov 2024 15:35:02 -0500 (EST) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-12.internal (MEProxy); Tue, 19 Nov 2024 15:35:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1732048502; x=1732134902; bh=G t0fUC9BpP9m7kIuTZZx6IRCkyTJWORRGR2iVIp/+Z4=; b=Xh3WQGSIKzMPqX6dR FVLbmXoAS0frSL+iz8JskeMa18HK4l8SpxO+cZQxzjpUOysJSQsDQVFqnvBgcOrC +FvK/Hg47FwK2gSQIvt39RgrhNNSgpxPxuEXRsGN73OG9MkNfo76zf3CNF+CUnDR H3VcaGkn8Nh+PqUNrcdyNZ/fC7n4krQtNhHFC037PcA50EJCbMNwjW+piJdUDLE6 NFT5vnD9NRRnns5899dE+yay0G1TmhwIIw+do4SCsI3NKiaH7rIjXipc4lkFsS2K m2z/JnImp18ncD9dZ6AzAYdpk8vu+hSC6rNJFvb8xKu+etyWa7jDzXG7PU3flrAv 1JRcw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedvgddufeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfhfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeftihgthhgrrhguuceurhhoohhk shgshicuoehrphhtsgduodgrlhhpihhnvgesphhosghogidrtghomheqnecuggftrfgrth htvghrnhepvddtjeejheekhffgffefveekieeiueegheefhfegfeelkeetiedtkeekjeeg ieehnecuffhomhgrihhnpehshhgvlhhltghhvggtkhdrnhgvthenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrphhtsgduodgrlhhpihhnvges phhosghogidrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepmigrlhhpihhnvgdsuhhsvghrsheslhhishhtshdrrghlphhinhgvlhhi nhhugidrohhrgh X-ME-Proxy: Feedback-ID: i2d09494f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <~alpine/users@lists.alpinelinux.org>; Tue, 19 Nov 2024 15:35:01 -0500 (EST) Message-ID: Date: Tue, 19 Nov 2024 20:34:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Resources for learning shell scripting To: ~alpine/users@lists.alpinelinux.org References: <7E9adkshBkdIyIQ32k_uNdc0hYj_3IJscut2UaWtfSZsKw3UGECWAAxpPgJhS3KooI_O5ftRO53MsaNbZ4-oZQ==@protonmail.internalid> Content-Language: en-GB, en-US From: Richard Brooksby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-11-19 14:57, Paul Zillmann wrote: > Could you recommend any good resources to learn how to script for POSIX > in the first place? I highly recommend a habit of running your scripts through shellcheck , which is probably available from the package system of your distro (e.g. "apt-get install shellcheck"). I've been writing shell scripts for decades and it still catches my mistakes. It gives good and specific advice. And investigating *why* it gives advice is great for learning. > I'm not a very good bash scripter myself, usually I work with compiled > languages like C and Golang. Shells have grown rather organically and have fewer unifying principles than those languages. Be prepared for weirdness.