All Questions
6 questions
1vote
1answer
91views
When would [[ ]] test fail and [ ] succeeds for the same test?
I came across a script that has the line: java_version=$($JAVA_HOME/bin/java -version 2>&1 | awk -F '"' '/version/ {print $2}' | cut -d '_' -f 1,3) followed by the test: if [[ -n "$...
0votes
1answer
793views
Linux start screen and run a java program and detach it?
I have the following script that should do the following: Stop screen "server" if exists Start screen "server" Run a java program and detach screen. However, when I firstly run the script, the program ...
0votes
1answer
62views
linux + compare between two folders
under /usr/lib/ambari-metrics-get folder and /usr/lib/ambari-metrics-put we have jar files /usr/lib/ambari-metrics-get/stax-api-1.0.1.jar /usr/lib/ambari-metrics-get/stringtemplate-3.2.1.jar /usr/...
1vote
1answer
691views
how to find the higher java version on linux machine with bash or shell script
we need to test and compare java versions any suggestion for tricky way how to verify if $version > $New_version ? [root@master tmp]# version=$(java -version 2>&1 | awk -F '"' '/version/ {...
0votes
1answer
1kviews
Mandatory argument for script to run java program
My script is called: report_startDate It has the following line: $JRE_ROOT/bin/java -cp /home/me/report/config/:/home/me/report/jar/reporting-1.0-SNAPSHOT.jar com.me.project.report.Main $1 $1 makes ...
1vote
2answers
1kviews
Run jar on startup in all *nix based systems
I have a jar file which I need to run at startup in all distros of Linux. My previous question here, gave me an idea a rough idea on X-servers. Since I wasn't able to perform startup, I moved on to ...