•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,433 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,642 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1278 | Replies: 1 | Solved
![]() |
•
•
Join Date: Jul 2007
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All,
I am trying to use awk to strip out the java version after I run the java -version command. Unfortunately nothing I try works. Here is the command I am running along with the output:
# /h/jre/bin/java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
I am interested in just the 1.5.0_06 portion. Does anyone know how I can pipe this output to awk and have it return just that value?
Thx!
DY
I am trying to use awk to strip out the java version after I run the java -version command. Unfortunately nothing I try works. Here is the command I am running along with the output:
# /h/jre/bin/java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Server VM (build 1.5.0_06-b05, mixed mode)
I am interested in just the 1.5.0_06 portion. Does anyone know how I can pipe this output to awk and have it return just that value?
Thx!
DY
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- awk "for loop" and variables (Shell Scripting)
- Replacing text within a file using awk (Shell Scripting)
- awk problem (Community Introductions)
- awk problem (Shell Scripting)
- AWK command (Shell Scripting)
- First time using awk, I have a couple questions (Legacy and Other Languages)
- Shell Scripting problem and related awk issues (Shell Scripting)
- Help with SED/AWK email parser (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: Bash help please?
- Next Thread: Display a file using grep


Linear Mode