QStringList options; options << "-c" << "ls -l | grep a | sort"; QProcess process; process.start("/bin/bash", options); process.waitForFinished(); process.waitForReadyRead(); // process.close();