The command I'm running is:
locate -b '\java' | xargs -ri find {} -prune -type f -executable | xargs bash -c '$0 -version'
Below is the response
java version "1.6.0_41"
OpenJDK Runtime Environment (IcedTea6 1.13.13) (rhel-1.13.13.1.el6_8-x86_64)
OpenJDK 64-Bit Server VM (build 23.41-b41, mixed mode)
What I'm hoping to do is place this all on 1 line.
I've tried various sed and awk but is always comes back as 3 lines.