This programm is virrus scanner, used during upload the file to server.
When I run it on console, it works:

# cd /usr/local/cai; ./inocucmd -SEC -NEX /tmp/zavirovany.pif
----------/tmp/zavirovany.pif
[/tmp/zavirovany.pif] was infected by virus [Win32/Sobig.Worm]

Total Files Scanned:        1
Total Bytes Scanned:        65536
Total Viruses Found:        1
Total Infected Files Found: 1
Scan Type:                  Secure

*** End Of Summary ***
# echo $?
100
#


# cd /usr/local/cai; ./inocucmd -SEC -NEX /tmp/Bmw.jpg
----------/tmp/Bmw.jpg

Total Files Scanned:        1
Total Bytes Scanned:        182734
Total Viruses Found:        0
Total Infected Files Found: 0
Scan Type:                  Secure

*** End Of Summary ***
# echo $?
0
#


Jiri

<citováno kdo="Asif.Raj">
> could you please give some details about the shell program you are
> running it is possible that that program is not getting executed
> properly.
>
> regards
> asif
>
> -----Original Message-----
> From: Jiri Chaloupka [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 27, 2003 2:54 PM
> To: [EMAIL PROTECTED]
> Subject: trouble with readin value from Runtime.exec(cmd)
>
>
> Hallo,
> I have shell program, which I must call and read its output. On the
> console it print some output to console and has some *return value*.
> This return value I must read back to java:
>
> The part of code is:
> ****************************
> String ress = "---";
> Process p = null;
> try{
>  Runtime r = Runtime.getRuntime();
>  p = r.exec("cd /usr/local/cai; ./inocucmd -SEC -NEX /tmp/file.pif;
> echo $?");
>  BufferedReader in = new BufferedReader(new
> InputStreamReader(p.getInputStream()));
>
>  while (in.readLine() != null) {
>   ress = "<br>"+in.readLine();
>  }
>  in.close();
> }catch(Exception et){
>  out.println("Fail: "+et.toString());
> }
> out.println("<br>result is: "+ress+"<br>");
> ***************************************************************
> but there is no value ... (in.readLine() conatins null)
>
> Is there anything what I not comprehed good? or where can be way?
>
> Thanks
> Jiri
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com


--
Jiri Chaloupka
B2BExpander.com
[EMAIL PROTECTED]
**********************************************
http://www.b2bexpander.com/
http://www.chalu.cz - intranet groupware solution

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to