I found great examples of what Im looking for here : http://hugoduncan.org/post/2010/shell_scripting_in_clojure_with_pallet.xhtml
But seems like this "Pallet" is not what it was earlier... it says "Pallet is platform for agile and programmatic automation of infrastructure in the cloud, on server racks or directly on virtual machines. Pallet provides cloud provider and operating system independence, and allows for an unprecedented level of customization." - it's not what I want. I need just shell scripting.
Is there something alike in Clojure?
The part of Pallet that translates clojure s-expressions into shell script is called Stevedore and it is available as a separate library: https://github.com/pallet/stevedore
Documentation on both Pallet and Stevedore on the Pallet website might not always be complete or accurate (the docs are a bit behind current code), so it might require a bit of puzzling.
Out of curiosity, what kind of shell scripting would you like to do in Clojure?
If Stevedore seems overkill for your particular case you can make simple clojure scripts and run them like any shell scripts using 'lein-exec' Leiningen plug-in.
http://www.unexpected-vortices.com/clojure/brief-beginners-guide/standalone-scripts.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With