A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Linux / UNIX
Executing JAVA code from shell script and grep the result
P B Madhavan
Joined: Dec 23, 2009
Jan 03, 2010 21:06:13
I am new to Unix. I have a question
I have a requirement to execute a JAVA class from Unix shell script.
I need to then grep for a key word "NOTOK" that is rendered by a System.out.println statement of the JAVA Class.
If I find the word, then I need to echo a message.
Could you kindly help me with this requirement?
Joined: Jun 25, 2001
Jan 04, 2010 05:08:27
my.app.MainClass | grep NOTOK && echo "something"
Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Executing JAVA code from shell script and grep the result
How return a string from java program to the shell which invokes thee java command
issue in passiing variable to shell script
any java method which can work like grep command in unix
issue when calling shell script from java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013