Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yinchunxiang/5edb12b6a8d836d0075866ca7e6a3d71 to your computer and use it in GitHub Desktop.
Save yinchunxiang/5edb12b6a8d836d0075866ca7e6a3d71 to your computer and use it in GitHub Desktop.
{python} read from stdin and write to stdout
echo hallo | python -c "import sys;[sys.stdout.write(line) for line in sys.stdin]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment