diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-07-16 15:05:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 15:05:39 (GMT) |
commit | 86742d4ce8d6c301104e238699b30f6bdaf9f9cb (patch) | |
tree | b72b7aa6f6a12ea166686311ff0eb4291af12595 | |
parent | 1ff4c4277421c02df5ca0894fb95de70cd9cd5f4 (diff) | |
download | cpython-86742d4ce8d6c301104e238699b30f6bdaf9f9cb.zip cpython-86742d4ce8d6c301104e238699b30f6bdaf9f9cb.tar.gz cpython-86742d4ce8d6c301104e238699b30f6bdaf9f9cb.tar.bz2 |
Replace backquote with command substitution in subprocess doc example (GH-13941)
Replace backquotes with POSIXy command substitution in example.
(cherry picked from commit 6a61714cde7037cd9a1bcc11ecccb17fe3081295)
Co-authored-by: David Jones <drj@pobox.com>
-rw-r--r-- | Doc/library/subprocess.rst | 10 | ||||
-rw-r--r-- | Doc/tools/susp-ignored.csv | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index af33879..7e1e3f9 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -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:: diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index 85263d4..9129ee8 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -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, |