Relative Content

Tag Archive for linuxxargs

Is there a way to take the output of xargs and combine any stderr and stdout into a single line so there is only have one line per command run?

I have a long list of symbolic links to python venvs that I would like to run the –version flag on. Some of the links are broken and some of the Python binaries require other versions of glibc than what is on the machine so that will print a multi-line error. My goal is to have the output of xargs, no matter how many lines of stdout or stderr, print a single line per symbolic link, so the output line count matches the input line count.