executing system command, (Q/K Process ?)

mostafa atteyah mostafai2001 at hotmail.com
Sat Apr 27 22:51:13 BST 2002


hii
to get the output of the system command u can use the redirect option of the 
bash to redirect ur output to a certain file (read the man of bash to know 
how to use redirect)
i dont remember exactly the code but it seems like that:

system (" ls -la /bin > filename ")

>or & one for stderr and the other for stdout

and then u can access this file using Qfile like that (QFile f(filename)) 
the same file name u used in redirection  to get  a handler to it and then 
read what u want..........
if it works tell me plz...
and send to me the correct code.....



>From: Christian Fricke <cfricke at kcommander.org>
>Reply-To: kdevelop at kdevelop.org
>To: kdevelop at kdevelop.org
>Subject: Re: executing system command, (Q/K Process ?)
>Date: Sat, 27 Apr 2002 17:04:29 +0200
>
>Hello,
>
>executing systemcommands you can use the command: system(const char 
>*string)
>Try to read its manpage:   man system
>
>But it is not easy to get the output :)
>
>Christian Fricke
>
>
>
>Dung Patrick schrieb:
> >
> >Hello,
> >
> >Here is my question:
> >QString cmd = "ls -la /bin"
> >How to execute the command and get the output to, say a QTextArea? But
> >I am without QProcess or KProcess (ie I use Qt 2.3.1)
> >
> >Thanks
>
>
>
>
>-
>to unsubscribe from this list send an email to 
>kdevelop-request at kdevelop.org with the following body:
>unsubscribe »your-email-address«




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list