4 ms·
Yes, in my mind this is the way to go (the other alternative, probably unviable, being scsh https://github.com/scheme/scsh https://github.com/scheme/scsh). I re
by loevborg 11y ago
Yes, in my mind this is the way to go (the other alternative, probably unviable, being scsh https://github.com/scheme/scsh https://github.com/scheme/scsh). I recently made a decision not to write any bash scripts that include a conditional or loop; for all those use cases python+sh is the way to go. The reason: http://mywiki.wooledge.org/BashPitfalls http://mywiki.wooledge.org/BashPitfalls
I can't think of any environment where python would not be available. You can even ship sh.py as a single-file dependency along with your script, so `import cp from sh` will work as expected.
- Johnny_Brahms 11y agoHaha! Just reading this thread I got the idea to replace bash with something scheme-like. You have a shell which works like it usually soes, but that easily let's you write any utilities in scheme. I use scheme to write most of my system stuff (most revently a custom automounter for my raspberry Pi) and thought it would have been a nice project. You could probably go macro galore and make it quite comfortable to do piping and integrate the regular system utilities in the language.