From owner-freebsd-questions@freebsd.org Fri Oct 16 04:32:30 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 908C144F59A for ; Fri, 16 Oct 2020 04:32:30 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CCCtP61kSz4Qmw for ; Fri, 16 Oct 2020 04:32:29 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4CCCtJ21NGzDsmZ for ; Thu, 15 Oct 2020 21:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1602822744; bh=AQvfGs0KerkrwJv4MsxVcFwHxlo9kHMskxJTabqwOMs=; h=Date:From:To:Subject:In-Reply-To:References:From; b=F2yq1136XjqmQK3brlnb3qa/WET0jYASXgiwpd2ESVw/EICWskmsiidSBFg1UQOY2 sc0BOt23CRtjhCcqPtYz9b0CI4LBz0Asd87gXa2SpAC7WDoFx0zX1VLasugt51bhnW SiEhhxPqvdFrOccHcMi8qSI6Vh2iSfZN/5Puh4f0= X-Riseup-User-ID: 0F2855BD2B6DF0353EC6927FC72356CB3177FDAEA78F52ECDCC6FBFD5EB0A705 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 4CCCtH3yjhzJmkd for ; Thu, 15 Oct 2020 21:32:23 -0700 (PDT) Date: Fri, 16 Oct 2020 06:32:11 +0200 From: Ralf Mardorf To: freebsd-questions@freebsd.org Subject: Re: sh scripting question Message-ID: <20201016063211.2f8b3a74@archlinux> In-Reply-To: References: <24456.60388.135834.43951@jerusalem.litteratus.org> <20201015204226099763897@bob.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CCCtP61kSz4Qmw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=riseup.net header.s=squak header.b=F2yq1136; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (mx1.freebsd.org: domain of ralf-mardorf@riseup.net designates 198.252.153.129 as permitted sender) smtp.mailfrom=ralf-mardorf@riseup.net X-Spamd-Result: default: False [-4.59 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[riseup.net:s=squak]; NEURAL_HAM_MEDIUM(-0.98)[-0.981]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[198.252.153.129:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[riseup.net:dkim]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[riseup.net:+]; DMARC_POLICY_ALLOW(-0.50)[riseup.net,none]; NEURAL_HAM_SHORT(-0.99)[-0.989]; NEURAL_HAM_LONG(-1.02)[-1.020]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:16652, ipnet:198.252.153.0/24, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions]; RCVD_IN_DNSWL_LOW(-0.10)[198.252.153.129:from] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2020 04:32:30 -0000 On Thu, 15 Oct 2020 23:14:13 -0400, Kurt Hackenberg wrote: >On 2020-10-15 23:05, Bob Proulx wrote: > >> Oh you are tormenting us now. :-) There are some subtle issues >> here. > > >Maybe a shell is the wrong tool. Exactly! Scripts are useful to handle tasks, such as dealing with reasonable file names. A script should work around reasonable tricky file names, but at some point bothering with really freakish file names isn't worth the effort. Actually file names should be compatible with shell, if they are intended to be used with shell scripts. To some extent we could use shell scripts, to write little programs, that probably better should be written in a programming language. At some extent a programming language is required, a shell script can't do the job at all or at best it could do the job, but not with reasonable effort.