473,786 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

9 New Member
Hi,

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

#!/bin/csh
set REQUIRED_VERSIO N=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 1268

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

Similar topics

6
1861
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 great benefit from it? What does ELSE minor-mode for Emacs do that is so great for you? Chris
6
3583
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 stdin pipe, it seems that if I give it some error nous expression, the pipe would return the exception data, though nothing else comes through. A friend of mine also tried this using win32api on delphi, and got the same result.
0
942
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 files, i do not know what reason. **************************************************************************** *************** ' Carries out the command associated with
0
791
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, system can not open the txt files. http://www.mvps.org/emorcillo/vb6/shell/shlext.msi
10
2159
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: http://www.autostratus.com/index.php?whatPage=makeRss It does just what I want it to do. However, I need for this script to get called every 15 minutes. So I set it up as a cron job. And cron doesn't like calling this thing. Cron
5
2214
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 about sorting and started thinking about shell sort.... and as part of my trying to pythonise my mind and break my java mindset So I decided to tackle this old school problem with the python mindset.
90
3466
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
2782
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 languages (and you always have to translate long-lived code). - I have used it only once, so far. So so far I'd liked to see it removed from Python 3.0. But then this article:
2
1499
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
1957
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
9650
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.