From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oAt1OVBo2GFrcQEAgWs5BA (envelope-from ) for ; Fri, 07 Jan 2022 17:20:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KJAMNlBo2GFaRQAAauVa8A (envelope-from ) for ; Fri, 07 Jan 2022 17:20:32 +0100 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 88D9A126D5 for ; Fri, 7 Jan 2022 17:20:32 +0100 (CET) Received: from localhost ([::1]:33012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5ryh-0008Ep-N6 for larch@yhetil.org; Fri, 07 Jan 2022 11:20:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5rxj-0007xS-TF for emacs-orgmode@gnu.org; Fri, 07 Jan 2022 11:19:31 -0500 Received: from ciao.gmane.io ([116.202.254.214]:60910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5rxg-0003Z4-AZ for emacs-orgmode@gnu.org; Fri, 07 Jan 2022 11:19:31 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1n5rws-0006Lx-Pj for emacs-orgmode@gnu.org; Fri, 07 Jan 2022 17:18:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [PATCH] ob-shell-test, test-ob-shell and introduction Date: Fri, 7 Jan 2022 23:18:24 +0700 Message-ID: References: <17d48f09729.ddbece82213631.8340272801066201269@excalamus.com> <87pmqs58mx.fsf@gmail.com> <17d53474fd6.c0a62421660695.6561002670353136607@excalamus.com> <87lf13pcme.fsf@gmail.com> <17d8ddd76f7.d167f605179643.3635445903460764440@excalamus.com> <87bl1u49ru.fsf@tsdye.online> <17dcc5a0e3e.d8ca0ef6361712.4976360594738663013@excalamus.com> <875yr4iu3a.fsf@tsdye.online> <17e11edb77e.adb20ab5289948.958495178633735939@excalamus.com> <17e2d800e0e.cfffb732642942.2036522928042669584@excalamus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <17e2d800e0e.cfffb732642942.2036522928042669584@excalamus.com> Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-2.691, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1641572432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MjMhGV2pC5Kif/Ulmv+9pfKk286Mf0f6T0h/v/qEMIU=; b=W24cXQqY8UElu5igSmNrIvHlH5Tso4FV51fVrhjscyT12tSa1dj82l7lqesI5IArcy8G2q AK26lR6CxnHcj3eFNbU7t++3sTnt7qLxY/YQenEW8AHxxAg/WwvYT7IKB3mQUgaPg1JWTO 10RZRbf0ly3vbgCcpURGHh87jSMpKexeOME7kFcKYF6GXIH/1P0tIWgyTaRnkqpOZWxg/1 gcrdipb0zkbPls48azq/6qnKQLQVP6pGk/ZvHezaQF0CNcl2yuSqvDHSDuLns1mARn2y75 ZpKIV/jFpo3aFJf7/uBtqfPjWYCE/fmjTewzodZtxi1cclLxv/W2tz5epsh2Sw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641572432; a=rsa-sha256; cv=none; b=VM2byaVImG/dj9+oz0WbayoS7NV8z3xPe55Mk56cnNBRdXBgwBwMETCu4xoknzwgBTC3Z5 oUd6Y365sGdvB6wqpyyTac4meT28Wv815upq93SUABC/QDRTtQj8o+clI2uc3x8Ob+27i4 RIwsfF0bWgmAFLkdnqIF4oCtTHVnOnabVyfgxlg18JEBdljmiJvNsj2snA/sPF7jkm3ELj KtDKblfcy9VH8RUXdC/Kttfjq1ZQA/njMbRZTNiQz1yk8V5vUSWYhFUlDNOy4m2CKXDhC/ Ou2IsWzCHkMbsIm9wBnB+OIHNqn1h/Rx1Pm7iHGJO9utOU9QR8UQtMblX0UaVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 88D9A126D5 X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: ysv8qbVzFzDw On 06/01/2022 10:47, Matt wrote: > > > - In your examples variable values are simple. Often it is safer to add > > double quotes around variable or command expansion. I would consider > > adding quotes just to encourage people to do the same by default with > > I appreciate these clarifications. Admittedly, I'm not great with > shell scripting. Your recommendations appear sound to me and I've tried > to incorporate them. I think, to illustrate unset variable escaped quotes were appropriate. Sorry that I was not clear enough. echo "X was set to \"$X\"" One more case where it is better (at least from my point of view) to add quotes even though they are not strictly necessary since command output contains single word and multiple words are interpreted by echo in the same way: echo "$(cut -f 1 -d "/") rocks!" > The updates have been made and are pushed. Thanks for your feedback! Thank you, text is more clear now. However first time I read it with more attention. I forgot to suggest you the following tool that catches more problems than execution the script with "-n" option: echo 'a=2; echo "$(($a * 2))"' | shellcheck -s sh - In - line 1: a=2; echo "$(($a * 2))" ^-- SC2004: $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...