Capturing Output of a Command from an Extension



How do I capture the output of a command?
One way could be running command with Util.spawn that redirects output to a file using '>' or using tee command. And then read the file with GLib.file_get_contents().
But I couldn't make the command output to file work right.
There should be a way to directly get output into a variable as string.
Please help!
Thank you :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]