QProcess执行带管道的shell命令

QStringList options;
options << "-c" << "ls -l | grep a | sort";
QProcess process;
process.start("/bin/bash", options);
process.waitForFinished();
process.waitForReadyRead();
//
process.close();
原文地址:https://www.cnblogs.com/bugchecker/p/execute_shell_command_with_pipelines_using_QProcess.html