From owner-freebsd-questions@freebsd.org Fri Oct 16 08:28:03 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 A06A642C03F for ; Fri, 16 Oct 2020 08:28:03 +0000 (UTC) (envelope-from bourne.identity@hotmail.com) Received: from EUR06-VI1-obe.outbound.protection.outlook.com (mail-vi1eur06olkn20807.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe11::807]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CCK6B3rn8z4bmk for ; Fri, 16 Oct 2020 08:28:02 +0000 (UTC) (envelope-from bourne.identity@hotmail.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H+jIr5pYSb4rtQ+vZ+yN5eIBIskqajaMeSTqU9iskSSIcMF+bTHkoeDOH8RBWiqKbT4JTfhKJy2+l96siR2M82hxHG3fHfCaXBKV9euxFQ+QMy52BlTyJ4HjiEdpu+mFL+YwOkbrZM9f+4joTcl4NzmSujd8u+pPLuLW+Lzk5T0C+iqzTE2mpEcyfSxjrPnEiahYxCc+j7iJL4MMpqbm6GHvwOMgbQm+J5DcBE7bhZ0QjDfwWrlgaWHVKTFx5jvOD/VX43VX/ItcHK5WGB4as1/KCtcYzE5K7gON9drSz71zf2AZDdXAMkcJsqTH4FJt5vQQsXj4vALFuo4l0o8Cmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mDUiy2ufcaRiG2rHWe+RMsd0zPuPyk7oPhqpbp2ipVY=; b=ePPSsN+8o6oMkiWfGd65NVlfaJ/EukZEsyX3r8X2/R6q4KkLPdx+3djzABzqiy+dLmJlC6IHAorsiY/B31DDEPA/oBHGLxIrVdr8avBir6rZfRCpz7n7TRIklvLG0XxLmSfsyDo0I2bg2LNDUzy5eyCmfSZg2iAzCAGGzXMU4GpFH97ewGYJhKS7WdBSB2HDG3ej8YOl82Tpo3iP3t0wbJQggo/IbRd5Z4Qxb1syotXJR15i6TeyL7x3beqtVVL8pqo722QliJ8vGZWU0W0oR2db4wo5OtAP1ngdhcDetxxF6VAKVedqmfZrUALlvbkKCQo9qOEpd11/Yn96QXL/nA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mDUiy2ufcaRiG2rHWe+RMsd0zPuPyk7oPhqpbp2ipVY=; b=bPxHdQQXN1dMRUKZ24ILcWOhnclFj8SMivi87v45wpeLVjVsuW6fIwW0Uyl1V1ZLJY61u4medb5pTwkyFh5gw5Og9O6b0IYq6beXvFqlmBEKY/Ns1Maj+f+RP2GqEuPPhtBSD9e/zES2dbO4R0QjWM/8FELxkvY8YydMOdYB19Iiz713b5rMuu3Ne4/KNbVaOd3UaYelpNA3k4WWVXnAXQBRpOKRZX+GORtJB0Nw/Gycjn/JZOWwlIlerOIjC/jS33giA8aC2jYYy0JllV0ss9fz2TCo6guoPehH8WHMw8ZiR/Zx5a4g0tnPx1d2GlMgUK0Tk3YgfDtN8aFq4EIuCA== Received: from DB8EUR06FT038.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::44) by DB8EUR06HT101.eop-eur06.prod.protection.outlook.com (2a01:111:e400:fc35::440) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21; Fri, 16 Oct 2020 08:12:24 +0000 Received: from DB8PR06MB6442.eurprd06.prod.outlook.com (2a01:111:e400:fc35::4a) by DB8EUR06FT038.mail.protection.outlook.com (2a01:111:e400:fc35::314) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Fri, 16 Oct 2020 08:12:24 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:5D245642B4EBCA0F1E334C6006C89D052AFCF07F51846D053962B3019ED9FF5F; UpperCasedChecksum:39F60925748AE61440E37E522BA956A381C5AF413C9EEEBB909B448CC839A874; SizeAsReceived:8693; Count:48 Received: from DB8PR06MB6442.eurprd06.prod.outlook.com ([fe80::5822:2d5d:a176:574f]) by DB8PR06MB6442.eurprd06.prod.outlook.com ([fe80::5822:2d5d:a176:574f%9]) with mapi id 15.20.3477.023; Fri, 16 Oct 2020 08:12:24 +0000 Subject: Fwd: Re: sh scripting question References: To: FreeBSD From: Manish Jain X-Forwarded-Message-Id: Message-ID: Date: Fri, 16 Oct 2020 13:42:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-TMN: [yWHUYsWUg0xUQhn9MNvxqMgSm7EKtfgXtjN1VsPbCDs=] X-ClientProxiedBy: BM1PR01CA0111.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::27) To DB8PR06MB6442.eurprd06.prod.outlook.com (2603:10a6:10:126::7) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.2] (103.195.202.206) by BM1PR01CA0111.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Fri, 16 Oct 2020 08:12:23 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 691b42f8-93a1-464e-465e-08d871ab369d X-MS-TrafficTypeDiagnostic: DB8EUR06HT101: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3HQ9Ucctqb3ZgJZCmIEEAGlJegXZADqVJNMTNjrPFmGB/3WgF6bryIW0o2F1yIaGTDUoHUucTnO8cM+KU8i+di8YXKqZyDpvzW8NkBnX9gZcs+GwDynWOS3LsQKAzAMPzM+s3EsSlJJfUE0yB8lO2ZYlumevl5cp3Giow8geIn1NTQSa0W0RpQfrQdmLW/3/Jl9SeSAKOaKMZhT45DP/ow== X-MS-Exchange-AntiSpam-MessageData: 29MJtYh3xYSR3ik06jZ6ix6/sQjIix1yjSeIY7z+80+/TrBSLdzf1YFOTUlCfklw+QljyflCdnNXdvTsR83MmvcilC2qv3IWGoI/uoaGJ1T3mdkcyAYtqWwkMpO15x+JxL7P66Nhjy1W7eJGvuCRhA== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 691b42f8-93a1-464e-465e-08d871ab369d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2020 08:12:24.4937 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR06FT038.eop-eur06.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR06HT101 X-Rspamd-Queue-Id: 4CCK6B3rn8z4bmk X-Spamd-Bar: +++++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hotmail.com header.s=selector1 header.b=bPxHdQQX; dmarc=pass (policy=none) header.from=hotmail.com; spf=pass (mx1.freebsd.org: domain of bourne.identity@hotmail.com designates 2a01:111:f400:fe11::807 as permitted sender) smtp.mailfrom=bourne.identity@hotmail.com X-Spamd-Result: default: False [9.58 / 15.00]; FREEMAIL_FROM(0.00)[hotmail.com]; R_SPF_ALLOW(0.00)[+ip6:2a01:111:f400::/48]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[hotmail.com:+]; DMARC_POLICY_ALLOW(0.00)[hotmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[103.195.202.206:received]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[hotmail.com]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_ALLOW(0.00)[microsoft.com:s=arcselector9901:i=1]; DWL_DNSWL_NONE(0.00)[hotmail.com:dkim]; RECEIVED_SPAMHAUS_XBL(5.00)[103.195.202.206:received]; R_DKIM_ALLOW(0.00)[hotmail.com:s=selector1]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.10)[0.101]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_MEDIUM(0.98)[0.978]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.004]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[freebsd-questions] X-Spam: Yes 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 08:28:03 -0000 -------- Forwarded Message -------- Subject: Re: sh scripting question Date: Fri, 16 Oct 2020 13:39:06 +0530 From: Manish Jain To: Ralf Mardorf On 2020-10-16 10:02, Ralf Mardorf wrote: > 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. I would strongly disagree with that. If a problem can be solved with a shell script - and Robert Huff's problem is easily solvable with a simple Bourne shell script, then a shell script must be what is used to solve the problem. Robert, I gave you the solution. Do you have a problem with that solution ? Regards, Manish Jain