Skip to content

Instantly share code, notes, and snippets.

@pmbuko
Created June 8, 2016 17:09
Show Gist options
  • Save pmbuko/46443f1a4e077273b237d5e40953957e to your computer and use it in GitHub Desktop.
Save pmbuko/46443f1a4e077273b237d5e40953957e to your computer and use it in GitHub Desktop.
Java's version command output looks multi-line but isn't.
❯ java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
❯ java -version | head -1
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
❯ java -version | grep version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment