Sponsored Content
Top Forums Shell Programming and Scripting Why doesn't my function go through all of it's steps? Post 302785373 by Enkouyami on Monday 25th of March 2013 01:07:06 PM
Old 03-25-2013
[Solved]Why doesn't my function go through all of it's steps?

Why doesn't the CheckJavas function go through all of it's steps?
Code:
#-------------------#
#   Java Checking   #
#-------------------#
CheckJavas() { # Here, this script will attempt to check for Java by checking to see if installation folders are present.
echo -n "Checking for Java"
echo ""
echo "Looking for Sun Java 6"
if [ -e /usr/lib/jvm/java-6-sun ] && [ -e /usr/lib/jvm/java-6-sun/bin ] && [ -e /usr/lib/jvm/java-6-sun/bin/java ]; then
    echo "Sun Java 6 is installed!"
    echo ""
else
    echo "Sun Java 6 is NOT installed"
    echo ""
fi
echo -n "Looking for Oracle Java 7"
if [ -e /usr/lib/jvm/java-7-oracle ] && [ -e /usr/lib/jvm/java-7-oracle/bin ] && [ -e /usr/lib/jvm/java-7-oracle/bin/java ]; then
    echo "Oracle Java 7 is installed"
    echo ""
else
    echo "Oracle Java 7 is NOT installed"
    echo ""
fi
echo -n "Looking for OpenJDK 6"
if [ -e /usr/lib/jvm/java-6-openjdk-common ] && [ -e /usr/lib/jvm/java-6-openjdk-common/jre ] && [ -e /usr/lib/jvm/java-6-openjdk-common/jre/lib ]; then
    echo "OpenJDK 6 is installed"
    echo ""
else
    echo "OpenJDK 7 is NOT installed"
    echo ""
fi
echo -n "Looking for OpenJDK 7"
if [ -e /usr/lib/jvm/java-7-openjdk-common ] && [ -e /usr/lib/jvm/java-7-openjdk-common/jre ] && [ -e /usr/lib/jvm/java-7-openjdk-common/jre/lib ]; then
    echo "OpenJDK 7 is installed"
    echo ""
else
    echo "OpenJDK 7 is NOT installed"
    echo ""
fi
echo "Detected java folders:"
echo "Default java client detected:"
java -version
echo ""
ls /usr/lib/jvm/
} ## END CheckJavas
CheckJavas


Last edited by Enkouyami; 03-25-2013 at 05:30 PM.. Reason: Solved it and explained how/why
 

10 More Discussions You Might Find Interesting

1. Solaris

steps to ufsrestore

Hello Folks, I have to restore from remote tape sun solaris 10. It has to have mirror raid. I have to restore /,/usr, /var,/opt, /etc,/u01. Could you please give me detailed steps to do the above? I am new to solaris Thanks Ram (1 Reply)
Discussion started by: vr76413
1 Replies

2. IP Networking

Subnetting in 11 steps

As seen on Digg.com, here is my ip addressing article in full... Original Subnetting in 11 Steps article Subnetting in 11 Steps There are a few things that you will need to know first. I personally use 11 rules that I learned from Mike Vana. Below you will find the 11 rules as well as... (1 Reply)
Discussion started by: jking2100
1 Replies

3. Solaris

Steps toward Solaris Administration

Dear All, I am currently working as Unix Operator. I am looking forward for Unix Solaris Administration. I need everyone's guidance on this forum, please advice me from where should i start. well i have already installed Solaris version on X86. So please let me know what should i do to become... (9 Replies)
Discussion started by: imrankhan.in
9 Replies

4. Shell Programming and Scripting

First steps in Perl

Hello, I want to start learning Perl, but I need some expert's advice:) Could you recommend me any online manual or book to start with? I have some experience with bash and C, so I am not a complete newbie in programming. What's your advise to start with? Thank you very much for your answers! ... (5 Replies)
Discussion started by: tsurko
5 Replies

5. Solaris

php installation steps..

hi .. i need procedure to install php on my solaris server.. i spent more than two weeks for this installation procedure.. but still couldn find a proper solution.. i have successfully enabled apache,tomcat,mysql,oracle .. this is the only issue am having rite now and its bothering me a lot.. ... (3 Replies)
Discussion started by: senkerth
3 Replies

6. UNIX for Dummies Questions & Answers

New install, how to capture the steps?

Hi All, I am working on a new server Dell which I need to install RH version 6.1. I need to document every thing I do on this server, how do I capture screen shot as I do the install? I used to work on Sun Solaris, I can do this by connecting on COM port after that I had the console access... (2 Replies)
Discussion started by: samnyc
2 Replies

7. Shell Programming and Scripting

Why double quotation marks doesn't work in ksh function parameters passing?

I'm working on AIX 6, ksh shell. The parameters are some strings quotated by double quotation marks which from a file. They are quotated because there may be spaces in them. Example: "015607" "10" " " "A"I want to pass these parameters to a shell function by writing the following command: ... (4 Replies)
Discussion started by: Shimmey
4 Replies

8. Shell Programming and Scripting

Function doesn't work

Hello, and here's my problem: I can't get my function to do what I want. When I call my function get_from_A_to_F I give it an argument $remainder. I want my function to substitute a number higher than 9 to a specific letter. If the argument is equal to 10 than it should change it to "A".... (8 Replies)
Discussion started by: linas
8 Replies

9. Solaris

Live upgrade first steps

Hello Guys, I am a little confused about the first step in the live upgrade process. I will be glad if someone can clarify this for me. The pre-live upgrade patch, when do you add this patch to the OS you want to upgrade? 1. before creating the new boot environment? or 2. after creating... (1 Reply)
Discussion started by: cjashu
1 Replies

10. Shell Programming and Scripting

Increase volume in steps

I would like to modify this so the buzzer starts at 15% and goes up to 30% in volume while it is playing. amixer -D pulse sset Master 30% > /dev/null 2>&1 cvlc --play-and-exit /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3 > /dev/null 2>&1 echo 'TIME IS UP.' gxmessage -fg blue... (2 Replies)
Discussion started by: drew77
2 Replies
XmScrollVisible(library call)											     XmScrollVisible(library call)

NAME
XmScrollVisible -- A ScrolledWindow function that makes an invisible descendant of a ScrolledWindow work area visible SYNOPSIS
#include <Xm/ScrolledW.h> void XmScrollVisible( Widget scrollw_widget, Widget widget, Dimension left_right_margin, Dimension top_bottom_margin); DESCRIPTION
XmScrollVisible makes an obscured or partially obscured widget or gadget descendant of a ScrolledWindow work area visible. The function re- positions the work area and sets the specified margins between the widget and the nearest viewport boundary. The widget's location relative to the viewport determines whether one or both of the margins must be adjusted. This function requires that the XmNscrollingPolicy of the ScrolledWindow widget be set to XmAUTOMATIC. scrollw_widget Specifies the ID of the ScrolledWindow widget whose work area window contains an obscured descendant. widget Specifies the ID of the widget to be made visible. left_right_margin Specifies the margin to establish between the left or right edge of the widget and the associated edge of the viewport. This margin is established only if the widget must be moved horizontally to make it visible. top_bottom_margin Specifies the margin to establish between the top or bottom edge of the widget and the associated edge of the viewport. This margin is established only if the widget must be moved vertically to make it visible. For a complete definition of ScrolledWindow and its associated resources, see XmScrolledWindow(3) RELATED
XmScrolledWindow(3). XmScrollVisible(library call)
All times are GMT -4. The time now is 03:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy