473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A Question about C-Shell (didn't know where else to put it)

Hi,

i'm trying to get run a simple script to find the java version.
this is what i wrote:

#!/bin/csh
set REQUIRED_VERSION=1.5
set JAVA=$JAVA_HOME

if ($#JAVA>0) then
set JAVA_EXE=$JAVA/bin/java
$JAVA_EXE -version 2>tmp.ver
set VERSION=`cat tmp.ver | grep "java version"
echo $VERSION
rm tmp.ver
endif

this is NOT working, the line $JAVA_EXE -version 2>tmp.ver is not working, the screen recieves the info and the file comes up empty.

more over, trying a different approach, i used grep directly on java -version, and i get nothing. the grep does not seem to work with this either.

what am i doing wrong?
please help.

thanks,
Koren
Sep 12 '07 #1
0 1251

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Christian Seberino | last post by:
I am looking at the ELSE home page and trying to figure out if I should invest the time to learn about the ELSE minor mode for Emacs. Is there any programmer out there using ELSE that is getting...
6
by: Avi Berkovich | last post by:
Hello, I was unable to use popen2.popen4 to grab python.exe's (2.3) output, for starts, it doesn't show the version information at the beginning and won't return anything when writing to the...
0
by: yxq | last post by:
Hello I have some code about shell extension, it works well, but when i choose more than a txt files and right-click, click open, system popup a dialog "InvokeCommand", system can not open the txt...
0
by: yxq | last post by:
Hello The resource code have some problems, Context Menu can show the selected file, but system can not open multi-files at one time, if select two or more txt files and right-click, click Open,...
10
by: lawrence k | last post by:
I've got a script called makeRss.php. It works fine if I try to open it with my browser. It makes an RSS feed for every page on my site. You can see it working here: ...
5
by: akameswaran | last post by:
Disclaimer - I recognize this is not a practical exercise. There are many implementations around that would do the job better, more efficiently (Meaning in C) or whatever. I caught some thread...
90
by: John Salerno | last post by:
I'm a little confused. Why doesn't s evaluate to True in the first part, but it does in the second? Is the first statement something different? False print 'hi' hi Thanks.
23
by: bearophileHUGS | last post by:
So far in Python I've almost hated the 'else' of the 'for' loops: - I have problems to remember its meaning; - It gives me little problems when I later want to translate Python code to other...
2
by: thungmail | last post by:
hi Im new to shepp script. I would like to ask how can I display a list of students in my class
5
by: premMS143 | last post by:
I am having confusion about Shell. Actually what is Shell..? What is Shell Scripting...? Where actually its used...? Please anybody reply for this. Please
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.