Hi,
Does anyone know how I can print out the return value from the main function on the shell command line?
Thanks!
This is a discussion on program return value within the Linux Programming forums, part of the Platform Specific Boards category; Hi, Does anyone know how I can print out the return value from the main function on the shell command ...
Hi,
Does anyone know how I can print out the return value from the main function on the shell command line?
Thanks!
Ivan
Depends on you shell
For csh, try
echo $status
For bash/sh/ksh, try
echo $?