import std.stdio;
import std.process;
 
void main() {
  string output = shell("ls -l");
  write(output);
}
Compile it with the D2.0 dmd compiler:
... and the run the compiled binary:
(See also 
this question on StackOverflow, where I documented this first).