Tired of bash scripting?

Written by: Michael Neale

Developer Zone

1 min read

Stay connected

Try Erlang escript .

In building out the Webmachine "clickstack" - I got into a slightly annoying mess with bash scripts. Bash isn't really programming, more bashing the keyboard.

So escript to the rescue - escript is basically scripting erlang. Place:

!/ usr / bin / env escript

At the top of the file - You can also invoke it via the little known "escript" command that ships with Erlang.

An actual example (which works) is here:
https://github.com/michaelneale/webmachine-clickstack/blob/master/patch_webmachine.erl

The main() function takes a list of "string" arguments - and what you do there is up to you.
I keep a tab open with http://erldocs.com in it - handy to find functions to do most things you would want to script.

See also .

Michael.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.

Loading form...
Your ad blocker may be blocking functionality on this page. Please disable for an improved experience.