PDA

View Full Version : Bash command



guiQt
3rd June 2010, 11:40
Trying to execute:

xprop -id `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | awk '{print $5}'` | grep "WM_CLASS(STRING)" | sed -e 's/.*= "\([^"]*\)".*/\1/'with the code:

QProcess sh;
sh.setProcessChannelMode(QProcess::MergedChannels) ;
sh.start("xprop -id `xprop -root | grep \"_NET_ACTIVE_WINDOW(WINDOW)\" | awk \'{print $5}\'` | "
"grep \"WM_CLASS(STRING)\" | sed -e \'s/.*= \"\\([^\"]*\\)\".*/\\1/\'");
...but what i get is:

xprop: error: Invalid window id format: `xprop.
What did i forget to do? :confused:
Thanks.

squidge
3rd June 2010, 12:22
QProcess does not support such features. Substitution and piping is part of the command processor bash.