PDA

View Full Version : How to run shell scripts ?



npc
22nd May 2006, 10:27
Hi,

I am working in a Linux box, Using Qt 3.3.4, I dont know how to run shell scripts from the code. Is there any command to execute the shell commands ?

Plz let me know, If you know.

Thanks in advance.
-Deep

sumsin
22nd May 2006, 10:32
use system() command

zlatko
22nd May 2006, 10:34
or maiby QProcess :rolleyes:

npc
22nd May 2006, 11:34
Thank you sumsin and zlatko,

Hi sumsin, could you tell me what is the header file for system () command.

npc
22nd May 2006, 12:30
Its working for me now , thank you.
The header file for system () command is stdlib.h

wysota
22nd May 2006, 12:59
Just remember that system() blocks your entire application (or at least the thread where it was invoked) until the external process is finished.