Hacker News new | ask | show | jobs
by samatman 818 days ago
This is of course a false dichotomy, there's nothing pseudo about using bash (perhaps you mean sudo?) and bash scripts orchestrate what you call 'actual' programs.

I commonly write little python scripts to filter logs, which I have read from stdin. That means I can filter a log to stdout:

   cat logfile.log | python parse_logs.py
Or filter them as they're generated:

   tail -f logfile.log | python parse_logs.py
Or write the filtered output to a file:

   cat logfile.log | python parse_logs.py > filtered.log 
Or both:

   tail -f logfile.log | python parse_logs.py | tee filtered.log
It would be possible, I suppose, to configure a single python script to do all those things, with flags or whatever.

But who on Earth has the time for that?