Execute an external command in D

import std.stdio;
import std.process;
 
void main() {
  string output = shell("ls -l");
  write(output);
}

Compile it with the D2.0 dmd compiler:
dmd dls.d

... and the run the compiled binary:
./dls

(See also this question on StackOverflow, where I documented this first).