cmd = ("the linux command")
cmd | getline dk;
close(cmd)

dk stores the output of the command.

相关文章: