As an example I am using xdotool
to obtain the list of windows on my desktop, which outputs a list of numbers, one on each line.
An example command for that is: xdotool search --name "a_program"
, which lists all the windows, which contain the string a_program
in their title.
An example output would be:
50853718
50853807
50859414
An example command for getting the window title from the number is xdotool getwindowname 50854718
.
How would I construct a command using xargs
so that the output on every line would be translated to xdotool getwindowname outputnumber
?
The question is mainly about xargs
, though any comments about xdotool
would be welcome.