Hi Guys,
I'm using a
Java application which runs a shell script in Unix server for printing . In shell script I want to set the page length and remove the file if print was successful. My code is as follows .
I have tried with
but here file is not getting deleted after printing. Hence i went for using if / else .
My question is if any exception occurs in shell script(OUT returns value other than 0) , how to return that value to my calling program in Java .