From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elia Pinto Subject: [PATCH 001/14] howto-index.sh: use the $( ... ) construct for command substitution Date: Wed, 16 Apr 2014 10:29:45 -0700 Message-ID: <1397669398-25410-1-git-send-email-gitter.spiros@gmail.com> Cc: Elia Pinto To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Wed Apr 16 19:30:22 2014 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 1WaTfA-0004Wb-V8 for gcvg-git-2@plane.gmane.org; Wed, 16 Apr 2014 19:30:21 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754974AbaDPRaN (ORCPT ); Wed, 16 Apr 2014 13:30:13 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:65336 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752444AbaDPRaG (ORCPT ); Wed, 16 Apr 2014 13:30:06 -0400 Received: by mail-pd0-f178.google.com with SMTP id x10so10945241pdj.23 for ; Wed, 16 Apr 2014 10:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=kEi0dT4h7EUJp4jgChfBiZn9T1xrt3qVcrOlPuf/2ys=; b=A90KUdNDs8k5x5K5r0Ql+dtWrYbC8vOl95ACbbuKS56odes51w+oRuE1JaanNbk0fv H3SVgOpFcZhVHoof0J+VQFqmOyPgcov6aT+Weig7DkICtLWG9IymW83WSId+ig2RF0JX rJ2bYS4GAvvv1u1oTw7jOqrwbzfnokhgcW3YWjBm19hkOYkEW928Al2Pwo9oLB24uzCS QvXGHhd5Ju/0CjN+qvgXBPGZiECC8pt4MV41m6BXjF9lC2ctU7K/AC/O8IOjR6FuNJPM ZLSBVWjcfN6AlQVLXtKqhstHMJnrdxzVPB30jP2NX4lPN/k2wv3ySBDoRTrWFo50SGYH Tf4A== X-Received: by 10.68.189.33 with SMTP id gf1mr9762426pbc.111.1397669405229; Wed, 16 Apr 2014 10:30:05 -0700 (PDT) Received: from devzero2000ubu.nephoscale.com (140.195.207.67.nephoscale.net. [67.207.195.140]) by mx.google.com with ESMTPSA id z3sm113974244pas.15.2014.04.16.10.30.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Apr 2014 10:30:03 -0700 (PDT) X-Mailer: git-send-email 1.7.10.4 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 sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto --- Documentation/howto-index.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/howto-index.sh b/Documentation/howto-index.sh index a234086..167b363 100755 --- a/Documentation/howto-index.sh +++ b/Documentation/howto-index.sh @@ -11,8 +11,8 @@ EOF for txt do - title=`expr "$txt" : '.*/\(.*\)\.txt$'` - from=`sed -ne ' + title=$(expr "$txt" : '.*/\(.*\)\.txt$') + from=$(sed -ne ' /^$/q /^From:[ ]/{ s/// @@ -21,9 +21,9 @@ do s/^/by / p } - ' "$txt"` + ' "$txt") - abstract=`sed -ne ' + abstract=$(sed -ne ' /^Abstract:[ ]/{ s/^[^ ]*// x @@ -39,11 +39,11 @@ do x p q - }' "$txt"` + }' "$txt") if grep 'Content-type: text/asciidoc' >/dev/null $txt then - file=`expr "$txt" : '\(.*\)\.txt$'`.html + file=$(expr "$txt" : '\(.*\)\.txt$').html else file="$txt" fi -- 1.7.10.4