Skip to content

Instantly share code, notes, and snippets.

@NatLee
Created July 22, 2022 07:03
Show Gist options
  • Save NatLee/e159df73ae7a6e88fcfabd5eeda901bb to your computer and use it in GitHub Desktop.
Save NatLee/e159df73ae7a6e88fcfabd5eeda901bb to your computer and use it in GitHub Desktop.
Subprocess Check Output Example
import subprocess
output = subprocess.check_output("export ABC=123; echo $ABC", shell=True)
print("ABC:", output)
# ABC: b'123\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment