i want to get the result of the following command into a variable.
xprop -name "google-chrome-stable" | grep "window id" | awk '{print $5}' | awk '{print $1}'
the result should look something like that
OUTPUT=xprop -name "google-chrome-stable" | grep "window id" | awk '{print $5}' | awk '{print $1}'
echo $OUTPUT
I know it could be done with command substitution. The examples in the Link command substitution are not detailed enough because they dont explain how to escape the quotation marks and apostrophes. Could someone help me find out how to solve that?