Hi all,
I'm having problem in running shell script file with password parameter in linux. I can run the sh file without password parameter like this:
process
->start
("sh",
QStringList() <<
"shellscript.sh");
process->start("sh", QStringList() << "shellscript.sh");
To copy to clipboard, switch view to plain text mode
This works fine. But this time, i want to run this command:
echo mypassword | sudo -S sh shellscript.sh
echo mypassword | sudo -S sh shellscript.sh
To copy to clipboard, switch view to plain text mode
This works fine in terminal..
I have no idea on how to run this in QProcess..
Any response would be very much appreciated..
thanks..
Bookmarks