#2928 Execute Linux/windows bash commands in Fantom code then use the output

Sai Thallada Fri 6 Sep

I am trying to find if anyone can provide me an example code to execute bash commands using fantom code.

Also please attach few docs reference on all the methods what fantom supports for executing the commonds on operating system.

SlimerDude Fri 6 Sep

Hi @Sai, you can use the Process class to execute OS executables. Example:

Process(Str["ls"], `./`.toFile).run.join

Login or Signup to reply.