Hacker News new | ask | show | jobs
by murphy214 635 days ago
import os

os.system('mycommand | sed 's/ugly/beautiful/g' | awk -F: '{print $2,$4}' 1> something.report 2> err.log')

2 comments

You forgot to point out all those "footguns" you avoided by writing in Python rather than bash...
This has all of the purported problems of doing this directly in a shell language and zero advantages...