LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2019, 02:23 AM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Rep: Reputation: 17
Need Help :- Script to search all jdk version installed in /usr/java/ on multiple linux box


Team,

Need help to find out jdk version details installed in /usr/java/

on multiple linux servers.
 
Old 12-13-2019, 02:46 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,920

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
do you know the command find ?
 
Old 12-13-2019, 07:19 AM   #3
manoj.linux
Member
 
Registered: Aug 2007
Posts: 284

Original Poster
Rep: Reputation: 17
Thanks Pan, I know the command "find /usr/java -type d -name "jdk*, but i have not idea how to create the script and get the output from multiple linux servers. please suggest.
 
Old 12-13-2019, 07:19 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,662

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by manoj.linux View Post
Team,
Need help to find out jdk version details installed in /usr/java/ on multiple linux servers.
We are not on your 'team'. And you have been posting here for TWELVE YEARS now....do you seriously not know how to run the 'find' command after being an 'administrator' for twelve years??? Or how to read a man page on the java/jdk programs, and see which flag returns the version??

You've also posted threads where you never, EVER bother following up. A few examples from just this year:
https://www.linuxquestions.org/quest...ue-4175661874/
https://www.linuxquestions.org/quest...ed-4175651997/
https://www.linuxquestions.org/quest...on-4175650832/
https://www.linuxquestions.org/quest...nd-4175647477/

Quote:
Originally Posted by manoj.linux
Thanks Pan, I know the command "find /usr/java -type d -name "jdk*, but i have not idea how to create the script and get the output from multiple linux servers. please suggest.
So you first post asking us how to check this...then follow up with "I know the command, but I need a script"?? After working with Linux for 12 years, can you seriously not write a simple script???

::EDIT::
Asked a similar thing ELEVEN YEARS AGO, about a script to do things on multiple servers.
https://www.linuxquestions.org/quest...p-help-645282/
https://www.linuxquestions.org/quest...-linux-634977/

...so after eleven years of having such a script, you aren't able to modify it slightly? There are THOUSANDS upon thousands of bash-scripting tutorials you can easily find, showing you how to write a simple loop and assign variables....what actual effort have you shown to accomplish what you want? Or are you expecting the 'team' write you one?

Last edited by TB0ne; 12-13-2019 at 07:26 AM.
 
Old 12-13-2019, 02:33 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196Reputation: 4196
Everyone here volunteers their time and may choose which threads they respond to. So some may be put off when being approached as support team members as implying an obligation and not respectful of their actual relationship in this forum. Although use of the term be innocent, humorous or result from simple language differences, you may want to consider that when asking questions in future.

To use the find command in a shell script simply include with appropriate arguments much as you would on the command line.

To apply it to multiple servers you will need to provide an access path to those servers, usually via ssh. You can include that in a script as well but will need to provide a list of the servers from a file or in an array, and make provision for authentication on each. To receive help with that you will need to provide more details about how you are trying to accomplish that and how those things are done in your work environment.

Please review the Site FAQ for guidance in posting your questions and general forum usage. Especially, read the link in that page, How To Ask Questions The Smart Way. The more effort you put into understanding your problem and framing your questions, the better others can help!

Last edited by astrogeek; 12-13-2019 at 02:34 PM. Reason: tpoys
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Install Any Oracle Java (JDK) Version In Ubuntu, Debian, Linux Mint Or Fedora With install-java.sh LXer Syndicated Linux News 0 02-22-2019 02:23 AM
how do I set the java version to the version that I've just installed(Jdk) iansu Linux - Newbie 6 07-09-2011 04:03 PM
[SOLVED] Java Woes: A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available ... chytraeus Slackware 10 11-27-2010 10:04 AM
Where to get JDK 1.5.0_08 and JDK 1.6.0_10 for Linux Redhat Itanium servers java_ascii Linux - Software 1 09-22-2009 11:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration