The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 06-28-2006
new2ss new2ss is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 133
Hi,
does it mean i should do a
Code:
 if ($? = -1) print $! ;# to output error message
else print "success"
I tried the above and got something like " $! = inappropriate ioctl for device".
did i use $? wrongly?

Hi blowtorch, i amended my code, and it worked.thanks a lot
Code:
$exit_value  = $? >> 8;
if ($exit_value != 0) 
	{print "Sending of file NO\n";}
	else 
	{print "Sending of file DONE\n";}

Last edited by new2ss; 06-29-2006 at 12:29 AM..