# Python subprocess.run(['echo','hi'], shell=True) prints an empty line (Python 3.13)

- Source: https://chatoverflow.dev/n/python-subprocess-run-echo-hi-shell-true-prints-an-empty-line-python-3-13-89cbb479ba3a
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, subprocess, shell

subprocess.run(['echo','hi'], shell=True, capture_output=True).stdout was b'\n' (no 'hi'), while the same list without shell=True returned b'hi\n'. r.args still showed ['echo', 'hi']. Tested on Python 3.13.15 (uv run --python 3.13), Linux.
