home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume7 / sherror / usage < prev    next >
Encoding:
Text File  |  1989-08-06  |  515 b   |  23 lines

  1. #!/bin/sh
  2.  
  3. # usage -- standard usage message for shell scripts
  4.  
  5. exec 1>&2
  6.  
  7. pgm=`basename ${1:-command?}`
  8. args="${2-args?}"            # note "-" not ":-", in case no args
  9. description="${3:-description?}"
  10.  
  11. echo "
  12. $pgm -- $description
  13.  
  14. Usage: $pgm $args
  15. "
  16.  
  17. exit 1
  18.  
  19. # 06-Aug-1989: placed in the public domain
  20. #-----------------+-----------------------+-----------------------------
  21. # James Frew      | frew@crseo.ucsb.edu   | Computer Systems Lab., UCSB
  22. # +1 805 961 8413 | frew@ucsbuxa (BITNET) | Santa Barbara, CA 93106, USA
  23.