3 ms·
The thing other languages lack for me is a clean way to execute other programs. With bash it's just "grep whatever", in other languages it's "exec('grep whateve
by octalmage 9y ago
The thing other languages lack for me is a clean way to execute other programs. With bash it's just "grep whatever", in other languages it's "exec('grep whatever');". Then piping that output to another program is a lot of work.
Bash makes for really good program glue.
I've considered creating a library that scanned your PATH for binaries then created dynamic function signatures to allow calling the function by name. Then that dynamic module can be included, and you'll be able to grep by calling "grep". You could make it chainable and get something like: grep('something').cut('args'); or whatever.
Of course this would only be used for personal utility scripts.
- catdog 9y agoYes it's entirely possible to create a shell like "program glue" experience in python and somebody already has done it [1][2]. It's only the python standard library which is missing some convenient way to shell out. [1] http://plumbum.readthedocs.io/en/latest/ http://plumbum.readthedocs.io/en/latest/ [2] http://amoffat.github.io/sh/ http://amoffat.github.io/sh/