I have the following xdotool
output from the shell:
Window 98566146
Position: 5,279 (screen: 0)
Geometry: 960x480
I want it to be :
x=5
y=279
width=960
height=480
with awk, sed, or other tools.
CLARIFICATION: I want to format output of xdotool search --sync --class mpv getwindowgeometry
the way I described above using regular expression replace techniques via awk, sed or other tools. There is an example in the following link sed/awk replace a specific pattern under another pattern.
Such as
echo -e "Window 98566146\n Position: 5,279 (screen: 0)\n Geometry: 960x480\n" | awk ....
EDIT2:
Actually I could try the following awk line:
echo -e "Window 98566146\n Position: 5,279 (screen: 0)\n Geometry: 960x480\n" | awk -F'[:]' '{if (NR>1) print $2}'