Skip to content

Commit 6a61714

Browse files
drj11gpshead
authored andcommitted
Replace backquote with command substitution in subprocess doc example (GH-13941)
Replace backquotes with POSIXy command substitution in example.
1 parent e869281 commit 6a61714

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Doc/library/subprocess.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,12 +1166,12 @@ In the following examples, we assume that the relevant functions have already
11661166
been imported from the :mod:`subprocess` module.
11671167

11681168

1169-
Replacing /bin/sh shell backquote
1170-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1169+
Replacing :program:`/bin/sh` shell command substitution
1170+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11711171

11721172
.. code-block:: bash
11731173
1174-
output=`mycmd myarg`
1174+
output=$(mycmd myarg)
11751175
11761176
becomes::
11771177

@@ -1182,7 +1182,7 @@ Replacing shell pipeline
11821182

11831183
.. code-block:: bash
11841184
1185-
output=`dmesg | grep hda`
1185+
output=$(dmesg | grep hda)
11861186
11871187
becomes::
11881188

@@ -1199,7 +1199,7 @@ be used directly:
11991199

12001200
.. code-block:: bash
12011201
1202-
output=`dmesg | grep hda`
1202+
output=$(dmesg | grep hda)
12031203
12041204
becomes::
12051205

Doc/tools/susp-ignored.csv

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ library/stdtypes,,:len,s[len(s):len(s)]
218218
library/stdtypes,,::,>>> y = m[::2]
219219
library/stdtypes,,::,>>> z = y[::-2]
220220
library/string,,`,"!""#$%&'()*+,-./:;<=>?@[\]^_`{|}~"
221-
library/subprocess,,`,"output=`dmesg | grep hda`"
222-
library/subprocess,,`,"output=`mycmd myarg`"
223221
library/tarfile,,:bz2,
224222
library/tarfile,,:compression,filemode[:compression]
225223
library/tarfile,,:gz,

0 commit comments

Comments
 (0)