From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 06/10] contrib/thunderbird-patch-inline/appp.sh: use the $( ... ) construct for command substitution Date: Tue, 22 Dec 2015 15:10:28 +0100 Message-ID: <1450793432-9345-7-git-send-email-gitter.spiros@gmail.com> References: <1450793432-9345-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Tue Dec 22 15:11:19 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aBNeo-0003E2-CE for gcvg-git-2@plane.gmane.org; Tue, 22 Dec 2015 15:11:18 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754344AbbLVOLO (ORCPT ); Tue, 22 Dec 2015 09:11:14 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33073 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754092AbbLVOKp (ORCPT ); Tue, 22 Dec 2015 09:10:45 -0500 Received: by mail-pa0-f53.google.com with SMTP id cy9so35653938pac.0 for ; Tue, 22 Dec 2015 06:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jIq39n6TZBWFkg+DvDo80i512qyGbSxGiSsyAxIna7k=; b=iot8l4N4kVg+x1RrSOoDNzRU2eviP+wzj3BwPv7Oq6tOwbX3LdrPMKJr1iUuyiLP7p OX3AYwq5nHhoKXIl7QETeCQQR549FOcLyDOyrAovQ1kzK9L4vv14bvbhbRPWceM1vMR+ 3cXoS4pOqKeGVoQ7uElB13poRKNDs4cFgFXZwcPXXeEejoLW38MZ3R2IfgAIe6DYO0wY G51hSbit5BY5XyJEwDrmzYxYEigrGLPjTMxGAL0quRJ5AmvCPur5zhipmWFJDsJdOBQX iU4OuqV2RiuOIcsj/e5Vu3qKgZFQVVgeKTXZH+VbehlNKjaAZDiqeBAR3Su6XcfZh3Fr FZhQ== X-Received: by 10.66.100.228 with SMTP id fb4mr34967197pab.84.1450793445562; Tue, 22 Dec 2015 06:10:45 -0800 (PST) Received: from ubuntu14.nephoscale.com (static-67.207.195.141.nephosdns.com. [67.207.195.141]) by smtp.gmail.com with ESMTPSA id fe6sm46421455pab.40.2015.12.22.06.10.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 06:10:45 -0800 (PST) X-Mailer: git-send-email 2.3.3.GIT In-Reply-To: <1450793432-9345-1-git-send-email-gitter.spiros@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do perl -i -pe 'BEGIN{undef $/;} s/`(.+?)`/\$(\1)/smg' "${_f}" done and then carefully proof-read. Signed-off-by: Elia Pinto --- contrib/thunderbird-patch-inline/appp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh index 8dc73ec..1053872 100755 --- a/contrib/thunderbird-patch-inline/appp.sh +++ b/contrib/thunderbird-patch-inline/appp.sh @@ -31,8 +31,8 @@ BODY=$(sed -e "1,/${SEP}/d" $1) CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' "${PATCH}") DIFF=$(sed -e '1,/^---$/d' "${PATCH}") -CCS=`echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \ - -e 's/^Signed-off-by: \(.*\)/\1,/gp'` +CCS=$(echo -e "$CMT_MSG\n$HEADERS" | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \ + -e 's/^Signed-off-by: \(.*\)/\1,/gp') echo "$SUBJECT" > $1 echo "Cc: $CCS" >> $1 -- 2.3.3.GIT