![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| If statement - How to write a null statement | april | Shell Programming and Scripting | 3 | 04-16-2008 02:14 PM |
| How to check path exist or not in UNIX shell script | suneelc | UNIX for Dummies Questions & Answers | 3 | 01-22-2008 08:36 AM |
| how to check the actual path instead of link path | reldb | UNIX for Advanced & Expert Users | 4 | 10-04-2006 10:55 AM |
| how to check if path is present? | svennie | UNIX for Dummies Questions & Answers | 3 | 11-02-2004 06:13 AM |
| check a statement -- yes/no | yls177 | UNIX for Dummies Questions & Answers | 2 | 03-26-2003 10:46 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to get path and check in if statement
Hi, I was wondering if it possible to get the path of a variable and compare that to something. Basically I want to write a script that checks if my $JAVA_HOME is correct and if not then it sets it. So far I have... Code:
if [[$JAVA_HOME != '/pathhere']] then export JAVA_HOME='/pathhere' echo JAVA_HOME='/pathhere' fi Problem is that the script can't seem to understand that I want to compare the path $JAVA_HOME and not what's in there. Anyone know how to just extract the path from that already set variable? Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|