It is currently Tue, 30 Nov 2021 18:10:47 GMT



 
Author Message
 Exit status in /bin/sh
        Hello all. I am working with /bin/sh under Ultrix 4.3 and am trying
to write some scripts that check for exit conditions from Oman technologies
Z-modem protocols.

1. I need to check to see if the transfer was successful.
2. Depending on the value of the exit status, I need to do various
   things.

I am familiar with the basic concepts of shell programming and have been able
to write basic shell scripts to handle simple tasks. However, I do need a
GOOD explanation with script examples of how to 'test' and use 'exit'.

Thanks..



 Tue, 11 Jul 1995 23:21:22 GMT   
 Exit status in /bin/sh
In article <1993Jan22.152122.18...@news.csuohio.edu>, da...@randell.cba.csuohio.edu (Greg Boehnlein) writes:
|       Hello all. I am working with /bin/sh under Ultrix 4.3 and am trying
| to write some scripts that check for exit conditions from Oman technologies
| Z-modem protocols.
|
| 1. I need to check to see if the transfer was successful.
| 2. Depending on the value of the exit status, I need to do various
|    things.

  do_it
  case $? in
  0) echo Ok;;
  1) echo "Bad 1";;
  2) echo "Bad 2";;
  *) echo "Unexp. bad stat: $?";;
  esac

--
bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
    Keyboard controller has been disabled, press F1 to continue.



 Wed, 12 Jul 1995 07:19:26 GMT   
 
   [ 2 post ] 

Similar Threads

1. #!/bin/sh #!/usr/bin/sh can I do both for 2 diff machines

2. exit status of pipeline in sh/csh

3. subprocess exits with status 2, and sh script stops

4. Get the exit value in a piped command (/bin/sh)

5. sh: trap 0 and exit status

6. Getting exit status from backgrounded job in sh

7. Exit status in trapped exit function

8. Exit status, $?, and term status

9. /bin/sh, /bin/ksh crash with SIGSEGV with a huge script


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software