unix






unix − Calls to the UNIX Shell



This module makes it possible to make calls to the UNIX
shell. The shell used is /bin/sh, so the environment might
be different to the one you commonly use. C shell expansions
cannot be used. The module is extremely easy to use and
there is only one function.

Note that most UNIX commands produce a trailing new line.




cmd(String)

     Makes the call String to sh and returns the answer in a
     list of characters.

     Example: (bizarre version of ls)

     1> unix:cmd("for i in *; do echo $i; done").


 Claes Wikstrom ‐ support@erlang.ericsson.se