]> granicus.if.org Git - python/commitdiff
Replace backquote with command substitution in subprocess doc example (GH-13941)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Jul 2019 15:05:39 +0000 (08:05 -0700)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2019 15:05:39 +0000 (08:05 -0700)
Replace backquotes with POSIXy command substitution in example.
(cherry picked from commit 6a61714cde7037cd9a1bcc11ecccb17fe3081295)

Co-authored-by: David Jones <drj@pobox.com>
Doc/library/subprocess.rst
Doc/tools/susp-ignored.csv

index af338795dae340530957ebf5a5870cf2633b40dd..7e1e3f942c1c331394913a4b2f504c7fbedde145 100644 (file)
@@ -1166,12 +1166,12 @@ In the following examples, we assume that the relevant functions have already
 been imported from the :mod:`subprocess` module.
 
 
-Replacing /bin/sh shell backquote
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Replacing :program:`/bin/sh` shell command substitution
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 .. code-block:: bash
 
-   output=`mycmd myarg`
+   output=$(mycmd myarg)
 
 becomes::
 
@@ -1182,7 +1182,7 @@ Replacing shell pipeline
 
 .. code-block:: bash
 
-   output=`dmesg | grep hda`
+   output=$(dmesg | grep hda)
 
 becomes::
 
@@ -1199,7 +1199,7 @@ be used directly:
 
 .. code-block:: bash
 
-   output=`dmesg | grep hda`
+   output=$(dmesg | grep hda)
 
 becomes::
 
index 85263d47c8bba844f4ce19e555940091ee6e2130..9129ee85d7e279360e82e2b7ce06daa33ef98037 100644 (file)
@@ -216,8 +216,6 @@ library/stdtypes,,:len,s[len(s):len(s)]
 library/stdtypes,,::,>>> y = m[::2]
 library/stdtypes,,::,>>> z = y[::-2]
 library/string,,`,"!""#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
-library/subprocess,,`,"output=`dmesg | grep hda`"
-library/subprocess,,`,"output=`mycmd myarg`"
 library/tarfile,,:bz2,
 library/tarfile,,:compression,filemode[:compression]
 library/tarfile,,:gz,